Skip to content
Permalink
Browse files

fix editor smiley conversion at start and end of plaintext; updates #…

…1103
  • Loading branch information...
following5 committed Aug 30, 2017
1 parent e10e9b5 commit 22a35fac4fe6a1cda52d34dd04eff7143142177d
Showing with 7 additions and 0 deletions.
  1. +7 −0 htdocs/lib2/edithelper.inc.php
@@ -36,7 +36,14 @@ function processEditorInput($oldDescMode, $descMode, $text, &$representText)
// mode switch from plain text to HTML editor => convert HTML special chars
$text = nl2br(htmlspecialchars($text));
// .. and smilies
$text = ' ' . $text . ' '; // see Redmine #1103
$text = str_replace($smiley['text'], $smiley['spaced_image'], $text);
if (substr($text, 0, 1) == ' ') {
$text = substr($text, 1);
}
if (substr($text, -1) == ' ') {
$text = substr($text, 0, strlen($text) - 1);
}
$representText = $text;
} else {
// save HTML input => verify / tidy / filter;

0 comments on commit 22a35fa

Please sign in to comment.
You can’t perform that action at this time.