Warning: PyroCMS v2 is very old, these docs are provided free of charge, use at your own risk.
Text Helper
This helper adds functionality not available in the CodeIgniter Text Helper.
Functions
escape_tags($string)
Replaces any { or } characters with HTML entities to prevent parsing.
| Name | Default | Required | Description |
|---|---|---|---|
| string | Yes | A string containing parser tags |
// usage
escape_tags('Hello, my name is {{ name }}.');
// output
'Hello, my name is {{ name }}.'
process_data_jmr1($text = '')
Minifies content by stripping out whitespace, etc. Used by the Template library when minifying output is enabled.
| Name | Default | Required | Description |
|---|---|---|---|
| text | Yes | A string to minify. Most likely HTML code. |
// usage
$html = <<< HTML
<html>
<head>
<title>Page Title</title>
</head>
<body>
<p>This is the page content!</p>
</body>
</html>
HTML;
$result = process_data_jmr1($html);
// $result
'<html> <head> <title>Page Title</title> </head> <body> <p>This is the page content!</p> </body> </html>'
