Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: '<', '>', and '&'

...

The write() method writes text inside the current element. It scans the provided text for XML control characters ('<', '>', and '&') and converts them to their XML entity equivalents ('<&lt;', '>&gt;', and '&amp;'). The result is correct, safe, HTML/XML output even when the content (which may come from a template, or from an external source such as a database) contains such problematic characters.

...

The writeRaw() method writes unfiltered text into the DOM. When the DOM is rendered to markup, the provided string is written to the output stream exactly as-is. Care should be taken, as this can easily result invalid markup, or even markup that is not well formed. It can also introduce XSS vulnerabilities if the text comes from end users without proper filtering.

comment()

Adds an XML comment. The comment delimiters will be supplied by Tapestry:

...