Skip to content

Commit

Permalink
Fixed issue #6059: EM puts spaces between variables
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed May 3, 2012
1 parent a97c72d commit cf06f04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/helpers/common_helper.php
Expand Up @@ -4422,10 +4422,10 @@ function flattenText($sTextToFlatten, $keepSpan=false, $bDecodeHTMLEntities=fals
{
$sNicetext = stripJavaScript($sTextToFlatten);
// When stripping tags, add a space before closing tags so that strings with embedded HTML tables don't get concatenated
$sNicetext = str_replace('</',' </', $sNicetext);
$sNicetext = str_replace('</td',' </td', $sNicetext);
if ($keepSpan) {
// Keep <span> so can show EM syntax-highlighting; add space before tags so that word-wrapping not destroyed when remove tags.
$sNicetext = strip_tags($sNicetext,'<span>');
$sNicetext = strip_tags($sNicetext,'<span><table><tr><td><th>');
}
else {
$sNicetext = strip_tags($sNicetext);
Expand Down

2 comments on commit cf06f04

@zz0733
Copy link

@zz0733 zz0733 commented on cf06f04 May 4, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@c-schmitz
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean?

Please sign in to comment.