Livecode Wiki
Advertisement

Write the given (unicode) string to stdout, processing it for suitable output in an SGML markup context.

Built-in Message handler[]

Syntax:

put [ unicode ] markup <string>

Examples:

put markup "<p>foobar</p>"
put unicode markup uniEncode(tMyUTF8Markup, "UTF8")
# uniEncode() converts tMyUTF8Markup to UTF-16

Use the put markup command to write a string to stdout that contains HTML markup.

Upon output the text is converted to match the setting of the current outputTextEncoding property, with any unrepresentable characters being output using a decimal character entity reference &#ddddd;.

Additionally, the internal line ending character 'LF' is transformed on output to match the setting of the outputLineEndings property.

Parameters:

  • string (string): A string containing the HTML markup to output. If 'unicode' is notspecified, then string is considered to be in the native text encodingfor the platform. If unicode is specified, then string is considered tobe in UTF-16.

See also: put content (command),put binary (command),outputTextEncoding (property),outputLineEndings (property),

Advertisement