escape.HtmlPrintStream: Escape string to make it HTML compatible

Description Usage Arguments Value Author(s) Examples

Description

Some characters in HTML are used for markup and has to be escape to be display literally. First of all, "<" and ">" is escaped with &lt; and &gt;. The character "&" is escaped with &amp;. The quotation mark is escaped with &quote;.

Usage

1

Arguments

s

Character string to be escaped.

escQuote

If TRUE, quotation marks are escaped, otherwise not. Default value is FALSE.

Value

Returns a character string with escaped characters.

Author(s)

Henrik Bengtsson (http://www.braju.com/R/)

Examples

1
2
3
4
  s1 <- "It is well known that 0.999 < 1 & PI > 3.14."
  print(s1)
  s2 <- HtmlPrintStream$escape(s1)
  print(s2)

HenrikBengtsson/R.io documentation built on May 6, 2019, 11:54 p.m.