Skip to content

Commit f2cdcec

Browse files
committed
Version 1.2.1.1
1 parent 257e60f commit f2cdcec

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/htmLawed/htmLawed.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
htmLawed 1.2, 11 February 2017
4+
htmLawed 1.2.1.1, 17 May 2017
55
Copyright Santosh Patnaik
66
Dual licensed with LGPL 3 and GPL 2+
77
A PHP Labware internal utility - www.bioinformatics.org/phplabware/internal_utilities/htmLawed
@@ -858,7 +858,7 @@ function hl_tag($t) {
858858
if ($k == 'style' or !isset($aND[$k][$e])) {
859859
continue;
860860
}
861-
$v = str_replace(array('\\', ':', ';'), '', $v);
861+
$v = str_replace(array('\\', ':', ';', '&#'), '', $v);
862862
if ($k == 'align') {
863863
unset($a['align']);
864864
if ($e == 'img' && ($v == 'left' or $v == 'right')) {
@@ -1078,5 +1078,5 @@ function hl_tidy($t, $w, $p) {
10781078

10791079
function hl_version() {
10801080
// version
1081-
return '1.2';
1081+
return '1.2.1.1';
10821082
}

tests/SecurityTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class SecurityTest extends \PHPUnit_Framework_TestCase {
1919
*
2020
*/
2121
public function testDeprecatedAttributeInjection() {
22-
$html = '<div align="center;display:block;"></div>';
23-
$expected = '<div style="text-align: centerdisplayblock;"></div>';
22+
$html = '<div align="1&#x3b; background&#x3a; red">dd</div>';
23+
$expected = '<div style="text-align: 1x3b backgroundx3a red;">dd</div>';
2424

2525
$filtered = Htmlawed::filter($html);
2626
$this->assertSame($expected, $filtered);

0 commit comments

Comments
 (0)