mirror of
https://github.com/e107inc/e107.git
synced 2025-08-15 19:14:09 +02:00
Corrected internal parser conflict when code/pre tags contained curly brackets.
This commit is contained in:
@@ -350,6 +350,23 @@ TMP;
|
||||
'input' => '< 200',
|
||||
'expected' => '< 200',
|
||||
),
|
||||
23 => array(
|
||||
'input' => '[html]<pre>echo {e_BASE}."index.php";</pre>[/html]',
|
||||
'expected' => '[html]<pre>echo {e_BASE}."index.php";</pre>[/html]'
|
||||
),
|
||||
24 => array(
|
||||
'input' => '[html]<code>echo {e_BASE}."index.php";</code>[/html]',
|
||||
'expected' => '[html]<code>echo {e_BASE}."index.php";</code>[/html]'
|
||||
),
|
||||
25 => array(
|
||||
'input' => '[html]<img src="{e_BASE}image.jpg" alt="">[/html]',
|
||||
'expected' => '[html]<img src="{e_BASE}image.jpg" alt="">[/html]'
|
||||
),
|
||||
26 => array(
|
||||
'input' => "[html]<code>function sc_my_shortcode(){\nreturn \"Something\";}</code>[/html]",
|
||||
'expected' => "[html]<code>function sc_my_shortcode(){\nreturn "Something";}</code>[/html]"
|
||||
),
|
||||
|
||||
|
||||
);
|
||||
|
||||
@@ -1013,6 +1030,9 @@ TMP;
|
||||
// 1 => array('html' => '<script>alert(123)</script>', 'expected'=>''),
|
||||
// 2 => array('html' => '"><script>alert(123)</script>', 'expected'=>'">'),
|
||||
3 => array('html' => '< 200', 'expected'=>'< 200'),
|
||||
4 => array('html' => "<code>function sc_my_shortcode(){\nreturn \"Something\";}</code>", 'expected' => "<code>function sc_my_shortcode(){\nreturn \"Something\";}</code>"),
|
||||
5 => array('html' => "<pre class=\"prettyprint linenums\">function sc_my_shortcode(){\nreturn \"Something\";}</pre>", 'expected' => "<pre class=\"prettyprint linenums\">function sc_my_shortcode(){\nreturn \"Something\";}</pre>"),
|
||||
6 => array('html' => '<img src="{e_BASE}image.jpg" alt="">', 'expected'=>'<img src="{e_BASE}image.jpg" alt="">'),
|
||||
|
||||
);
|
||||
|
||||
@@ -1020,7 +1040,6 @@ TMP;
|
||||
{
|
||||
$result = $this->tp->cleanHtml($var['html']);
|
||||
$this->assertEquals($var['expected'], $result);
|
||||
// FIXME: This test doesn't do anything?
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user