Module modules.html.commands

Commands for the html module. There are several option variables used: PLATFORM: OS platform (linux or windows). FILE_IN: Location of the temporary file used as STDIN for various operations. FILE_OUT: Location of the temporary file that will contain output for various operations. REDIRECT: The command line symbol used for redirecting STDOUT to a file. PHP_CMD: The command that executes the PHP interpreter.

Functions

decode_html_entities () Uses PHP to replace HTML entities in the selection or the contents of the current line with their ASCII equivalents.
decode_url () Uses PHP to replace the URL-encoded selection or the contents of the current line with its URL-decoded equivalent.
encode_html_entities () Uses PHP to replace special characters in the selection or the contents of the current line with their HTML entities.
encode_url () Uses PHP to replace the selection or the contents of the current line with its URL-encoded equivalent.
get_sel_or_line () [Local function] Returns the current selection or the contents of the current line.
php_command (cmd, input) [Local function] Execute PHP and return the result printed to STDOUT.
strip_tags () Use PHP to strip HTML and PHP tags from the selection or the contents of the current line and replace the text.
toggle_block_comment () Toggle block comment function for HTML.
wrap_in_tag () Wraps the selected text inside a snippet that expands to an HTML tag.


Functions

decode_html_entities ()
Uses PHP to replace HTML entities in the selection or the contents of the current line with their ASCII equivalents. See also: php_command
decode_url ()
Uses PHP to replace the URL-encoded selection or the contents of the current line with its URL-decoded equivalent. See also: php_command
encode_html_entities ()
Uses PHP to replace special characters in the selection or the contents of the current line with their HTML entities. See also: php_command
encode_url ()
Uses PHP to replace the selection or the contents of the current line with its URL-encoded equivalent. See also: php_command
get_sel_or_line ()
[Local function] Returns the current selection or the contents of the current line.
php_command (cmd, input)
[Local function] Execute PHP and return the result printed to STDOUT.

Parameters

  • cmd: The PHP code to execute.
  • input: The text provided as STDIN for cmd.
strip_tags ()
Use PHP to strip HTML and PHP tags from the selection or the contents of the current line and replace the text. See also: php_command
toggle_block_comment ()
Toggle block comment function for HTML. If a single line is being block commented, it is done so on the same line. If multiple lines are being block commented, the start of the comment is placed on a new line before the first selected line and the end of the comment is placed on a new line after the last selected line.
wrap_in_tag ()
Wraps the selected text inside a snippet that expands to an HTML tag.

Valid XHTML 1.0!