Skip to content
Permalink
Browse files

fixed plaintext-editor space encoding; updates #1020

  • Loading branch information...
following5 committed Aug 24, 2017
1 parent 27fc7f8 commit 3b42d412afb477eb374d7031f946ab7c6f7040b0
Showing with 2 additions and 0 deletions.
  1. +2 −0 htdocs/lib2/edithelper.inc.php
@@ -48,6 +48,8 @@ function processEditorInput($oldDescMode, $descMode, $text)
// save plain text input => convert to HTML;
// also implemented in okapi/services/logs/submit.php
$text = nl2br(htmlspecialchars($text, ENT_COMPAT, 'UTF-8'));
$text = str_replace(' ', '  ', $text); // can produce new ' ' ('  ' + ' ')
$text = str_replace(' ', '  ', $text);
} else {
// mode switch from HTML editor to plain text, or decode HTML-encoded plain text
$text = html2plaintext($text, $oldDescMode = 0, 0);

0 comments on commit 3b42d41

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