diff --git a/htmLawed.php b/htmLawed.php index af87fff..7a77ece 100755 --- a/htmLawed.php +++ b/htmLawed.php @@ -1,7 +1,7 @@ '; unset($e); continue;} // Last open $add = ''; // Nesting - close open tags that need to be - for($j=-1, $cj=count($q); ++$j<$cj;){ + for($j=-1, $cj=count($q); ++$j<$cj;){ if(($d = array_pop($q)) == $e){break;} else{$add .= "{$d}>";} } @@ -390,7 +390,7 @@ function hl_spec($t){ if(!function_exists('hl_aux1')){function hl_aux1($m){ return substr(str_replace(array(";", "|", "~", " ", ",", "/", "(", ")", '`"'), array("\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", "\x08", '"'), $m[0]), 1, -1); }} -$t = str_replace(array("\t", "\r", "\n", ' '), '', preg_replace_callback('/"(?>(`.|[^"])*)"/sm', 'hl_aux1', trim($t))); +$t = str_replace(array("\t", "\r", "\n", ' '), '', preg_replace_callback('/"(?>(`.|[^"])*)"/sm', 'hl_aux1', trim($t))); for($i = count(($t = explode(';', $t))); --$i>=0;){ $w = $t[$i]; if(empty($w) or ($e = strpos($w, '=')) === false or !strlen(($a = substr($w, $e+1)))){continue;} @@ -698,7 +698,7 @@ function hl_tidy($t, $w, $p){ $r = ''; list($e, $r) = explode('>', $t[$i]); $x = $e[0] == '/' ? 0 : (substr($e, -1) == '/' ? 1 : ($e[0] != '!' ? 2 : -1)); $y = !$x ? ltrim($e, '/') : ($x > 0 ? substr($e, 0, strcspn($e, ' ')) : 0); - $e = "<$e>"; + $e = "<$e>"; if(isset($d[$y])){ if(!$x){ if($n){echo "\n", str_repeat($s, --$n), "$e\n", str_repeat($s, $n);} @@ -728,5 +728,5 @@ function hl_tidy($t, $w, $p){ function hl_version(){ // version -return '1.2.4.1'; +return '1.2.4.2'; } diff --git a/htmLawed_README.htm b/htmLawed_README.htm index 3eb07a5..cc88e4e 100644 --- a/htmLawed_README.htm +++ b/htmLawed_README.htm @@ -7,40 +7,40 @@
-htmLawed 1.2.4.1, 12 September 2017
+
+htmLawed 1.2.4.2, 16 May 2019
Copyright Santosh Patnaik
Dual licensed with LGPL 3 and GPL 2+
A PHP Labware internal utility - http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed
htmLawed documentation
if($element == 'object'){-
$new_element = '<param id='my_'. $id; allowscriptaccess="never" />';+$new_element = '<param id="my_'. $id. '"; allowscriptaccess="never" />';++$id;@@ -1827,6 +1827,8 @@htmLawed documentation
Version number - Release date. Notes
+ 1.2.4.2 - 16 May 2019. Corrects a PHP notice if a semi-colon is present in $config["schemes"]
+
1.2.4.1 - 12 September 2017. Corrects a function re-declaration bug introduced in version 1.2.4
1.2.4 - 31 August 2017. Removes use of PHP create_function function and $php_errormsg reserved variable (deprecated in PHP 7.2)
@@ -2278,8 +2280,8 @@
htmLawed documentation