summaryrefslogtreecommitdiff
path: root/it_html.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_html.class')
-rw-r--r--it_html.class4
1 files changed, 2 insertions, 2 deletions
diff --git a/it_html.class b/it_html.class
index 12ecf6b..02f3f2a 100644
--- a/it_html.class
+++ b/it_html.class
@@ -312,8 +312,8 @@ function _tag($name, $args)
;
else if (isset($value) && $value !== true) # normal case: value
{
- if (preg_match('/[<>&"\x00-\x08\x0a-\x0c\x0e-\x1f\x80-\x9f]/', $value)) # WARNING: copy/pasted from Q()
- $result .= " $key=\"" . str_replace("\n", "&#10;", htmlspecialchars(self::_cleanup($value, $charset), ENT_COMPAT, $charset)) . '"';
+ if (preg_match('/[<>&"\x00-\x08\x0a-\x0c\x0e-\x1f\x80-\x9f\n\t\r]/', $value)) # WARNING: copy/pasted from Q()
+ $result .= " $key=\"" . str_replace(["\n", "\t", "\r"], ["&#10;", "&#9;", "&#13;"], htmlspecialchars(self::_cleanup($value, $charset), ENT_COMPAT, $charset)) . '"';
else
$result .= " $key=\"$value\"";
}