xowiki::Includelet proc html_encode (public)

 xowiki::Includelet[i] html_encode string

Defined in /var/www/openacs/packages/xowiki/tcl/includelet-procs.tcl

Escape ampersands, angle brackets, and quotes for HTML.

Parameters:
string (required)
Text to escape.
Returns:
HTML-escaped text.

Testcases:
create_folder_with_page, create_workflow_with_instance, create_form_with_form_instance
Source code:
# ' is not a known entity to some validators, so we use the
# numerical entity here for encoding "'"
return [string map [list & "&amp;" < "&lt;" > "&gt;" \" "&quot;" ' "&#39;"] $string]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: