Instruction set reference
HIPE_OP_SET_TEXT
Send this instruction to the display server to populate a tag element with the specified text string. Any existing child elements are discarded.
- location: The tag element to be populated with text.
- arg[0]: Text to be placed in the tag element.
- arg[1]: If "1" is passed, Hipe will convert newline characters in arg[0] into HTML line breaks, carriage returns into empty paragraph tags, and tab characters into HTML tab character entities, in order to preserve such formatting. Otherwise, Hipe will set the text without modifying these characters. Most HTML tags (excepting the 'pre' tag) will consolidate tabs, newlines, etc. into a single space according to the HTML standard.
Notes
There is no need to worry about sanitising such things as HTML tags from the text in arg[0]. The text will be copied into the tag literally, and will not be interpreted as HTML code.
Some tags like the input tag don't accept text directly. The input tag requires text to be supplied through a special value attribute. Use HIPE_OP_SET_ATTRIBUTE instead for such tags.