From 49636e22e749749ab70b748e81ec3c21fd3aa29f Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Thu, 19 Feb 2015 16:27:08 +0100 Subject: guarantee valid html comments --- it_html.class | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/it_html.class b/it_html.class index 2a93473..0f29bab 100644 --- a/it_html.class +++ b/it_html.class @@ -88,7 +88,7 @@ function it_html($p = array()) 'use_it_state' => false, # If true, generate code needed by state.js (aka 'history iframe') 'srclines' => $GLOBALS['debug_srclines'], # append stackdump to each tag ); - $this->p['notexported'] = trim($p['notexported'] . ',configure,sanitize', ','); + $this->p['notexported'] = trim($p['notexported'] . ',configure,sanitize,comment', ','); # We know these doctypes. If you need something else, supply 'doctype' in p $this->doctypes = array( @@ -415,6 +415,14 @@ function select($tags, $options, $selected = null) return $this->_tag("select", array($tags, $html)); } +/** + * Outputs string as correctly quoted HTML comment + */ +function comment($string) +{ + return ""; +} + # internal: strip spans added by debug params function _strip_tags($html) { -- cgit v1.2.3