summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2013-02-16 21:11:40 +0000
committerChristopher Smith <chris@jalakai.co.uk>2013-02-16 21:11:40 +0000
commit07a7d21ae65e4288a32498c9c87dec9a5e39aab9 (patch)
tree4e2815e3983c492fd9073578bafaa0d53eac43d7
parent9bbf02e86e5c1181bbc288ce42f1937f309a7e79 (diff)
downloadrpg-07a7d21ae65e4288a32498c9c87dec9a5e39aab9.tar.gz
rpg-07a7d21ae65e4288a32498c9c87dec9a5e39aab9.tar.bz2
fix a couple of diff issues: shouldn't be any need to html encode before finding diffs; move quantifier outside regex condition
-rw-r--r--inc/html.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/html.php b/inc/html.php
index c2723bceb..6c42f6e7b 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -1163,7 +1163,7 @@ function html_diff($text='',$intro=true,$type=null){
list($l_head, $r_head, $l_minor, $r_minor) = html_diff_head($l_rev, $r_rev);
}
- $df = new Diff(explode("\n",hsc($l_text)),explode("\n",hsc($r_text)));
+ $df = new Diff(explode("\n",$l_text),explode("\n",$r_text));
if($type == 'inline'){
$tdf = new InlineDiffFormatter();
@@ -1238,8 +1238,8 @@ function html_softbreak_callback($match){
&\#?\\w{1,6};) # ... for html entities - we don't want to split them (ok to catch some invalid combinations)
&\#?\\w{1,6}; # yes pattern - a quicker match for the html entity, since we know we have one
|
-[?/,&\#;:]+ # no pattern - any other group of 'special' characters to insert a breaking character after
-) # end conditional expression
+[?/,&\#;:] # no pattern - any other group of 'special' characters to insert a breaking character after
+)+ # end conditional expression
REGEX;
return preg_replace('<'.$regex.'>xu','\0&#8203;',$match[0]);