|
|
| Text handling with html++ is easy and straightforward. Most operators and methods are overloaded to accept references to String objects as well as htmlObject-derived objects.
|
|
|
| Browsers interpret certain characters as control codes, so that text using those characters must be encoded in order to be properly displayed. The following table lists a few common characters and their HTML-encoded equivalents:
|
| symbol HTML code
|
| > >
|
| < <
|
| & &
|
| " "
|
|
|
| Traditionally, HTML authors have had to manually encode these characters into documents. Such encoding is error-prone, and makes C/C++ code less readable. To get around this, html++ provides the htmlText class, which automatically encodes and decodes text, letting you pass normal text in and rest assured that the properly encoded characters will be output when the HTML is generated.
|
|
|
| By default, all html++ methods that accept String objects convert text within Strings to htmlText objects.
|
|
|
|
|
| |