summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-09-18 20:23:39 +0000
committerthomascube <thomas@roundcube.net>2008-09-18 20:23:39 +0000
commitfdebae88c2c61915566d2eef910f7913c47930c8 (patch)
tree29db09ca9199347f3daaae47912395a13f462377
parent633142fa6b43649af0398bccb17f9cfdf5241cf8 (diff)
Better detection of HTML double-encoded entities
-rw-r--r--program/include/main.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index c279f3012..908ca3adc 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -347,7 +347,7 @@ function rep_specialchars_output($str, $enctype='', $mode='', $newlines=TRUE)
$str = strip_tags($str);
// avoid douple quotation of &
- $out = preg_replace('/&amp;([a-z]{2,5}|#[0-9]{2,4});/', '&\\1;', strtr($str, $encode_arr));
+ $out = preg_replace('/&amp;([A-Za-z]{2,6}|#[0-9]{2,4});/', '&\\1;', strtr($str, $encode_arr));
return $newlines ? nl2br($out) : $out;
}