Completed
Pull Request — development (#791)
by Nick
03:57
created
htdocs/lib2/edithelper.inc.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,9 +83,9 @@
 block discarded – undo
83 83
 /**
84 84
  * @param $text
85 85
  * @param $texthtml0
86
- * @param $wrap
86
+ * @param integer $wrap
87 87
  *
88
- * @return mixed|string
88
+ * @return string
89 89
  */
90 90
 function html2plaintext($text, $texthtml0, $wrap)
91 91
 {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             // mode switch from plain text to HTML editor => convert HTML special chars
41 41
             $text = nl2br(htmlspecialchars($text));
42 42
             // .. and smilies
43
-            $text = ' ' . $text . ' ';   // see Redmine #1103
43
+            $text = ' ' . $text . ' '; // see Redmine #1103
44 44
             $text = str_replace($smiley['text'], $smiley['spaced_image'], $text);
45 45
             if (substr($text, 0, 1) == ' ') {
46 46
                 $text = substr($text, 1);
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             // convert to HTML for storing to database
64 64
             // also implemented in okapi/services/logs/submit.php
65 65
             $text = nl2br(htmlspecialchars($text, ENT_COMPAT, 'UTF-8'));
66
-            $text = str_replace('  ', '  ', $text);   // can produce new '  ' ('  ' + ' ')
66
+            $text = str_replace('  ', '  ', $text); // can produce new '  ' ('  ' + ' ')
67 67
             $text = str_replace('  ', '  ', $text);
68 68
         } else {
69 69
             // mode switch from HTML editor to plain text, or decode HTML-encoded plain text
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         // REDMINE-1249: Missing log text in mail notification
126 126
         // simpler solution that converts html to text as the previous class html2text emptied the text completely
127 127
         // implementation for line wrap, url's and probably more is missing
128
-        $text = preg_replace( "/\n\s+/", "\n", rtrim(html_entity_decode(strip_tags($text))));
128
+        $text = preg_replace("/\n\s+/", "\n", rtrim(html_entity_decode(strip_tags($text))));
129 129
 
130 130
         $text = str_replace(
131 131
             [
Please login to merge, or discard this patch.