summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/text_helper.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php
index fa1de8bc6..ad051cd76 100644
--- a/system/helpers/text_helper.php
+++ b/system/helpers/text_helper.php
@@ -127,7 +127,17 @@ if ( ! function_exists('ascii_to_entities'))
if ($ordinal < 128)
{
- $out .= $str[$i];
+ /*
+ If the $temp array has a value but we have moved on, then it seems only
+ fair that we output that entity and restart $temp before continuing. -Paul
+ */
+ if (count($temp) == 1)
+ {
+ $out .= '&#'.array_shift($temp).';';
+ $count = 1;
+ }
+
+ $out .= $str[$i];
}
else
{