Menu ▾ ▴

#1007 HTML filter whitespace handling errors

5.4
closed-fixed
None
5
2020-12-13
2020-08-15
No

While testing, I found the following bugs in the html2 filter regarding the whitespace in the target html

  • "<pre> </pre>" (pre with all whitespace) would be compressed if compression is on. But pre should always keep its contents uncompressed. I fixed it at the cost of giving the whitespace for translation.
  • when compression is off, " xxx " results in " xxx " (double the pre/post whitespace)
  • the whitespace before a comment moves to after the comment if outside a text-tag.

Related

Bugs: #1062

Discussion

  • Aaron Madlon-Kay

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,5 @@
     While testing, I found the  following bugs in the html2 filter regarding the whitespace in the target html
    +
    
     * &#34;&lt;pre&gt;       &lt;/pre&gt;&#34; (pre with all whitespace) would be compressed if compression is on. But pre should always keep its contents uncompressed. I fixed it at the cost of giving the whitespace for translation.
     * when compression is off, &#34;   xxx   &#34; results in &#34;      xxx      &#34; (double the pre/post whitespace)
     * the whitespace before a comment moves to after the comment if outside a text-tag.
    
     
  • Aaron Madlon-Kay

    You need a blank line before the first item in a list.

     
  • Aaron Madlon-Kay

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,5 +1,5 @@
     While testing, I found the  following bugs in the html2 filter regarding the whitespace in the target html
    
    -* &#34;&lt;pre&gt;       &lt;/pre&gt;&#34; (pre with all whitespace) would be compressed if compression is on. But pre should always keep its contents uncompressed. I fixed it at the cost of giving the whitespace for translation.
    +* &#34;`&lt;pre&gt;       &lt;/pre&gt;`&#34; (pre with all whitespace) would be compressed if compression is on. But pre should always keep its contents uncompressed. I fixed it at the cost of giving the whitespace for translation.
    
     * when compression is off, &#34;   xxx   &#34; results in &#34;      xxx      &#34; (double the pre/post whitespace)
     * the whitespace before a comment moves to after the comment if outside a text-tag.
    
     
  • Martin Fleurke

    Martin Fleurke - 2020-08-20
    • status: open --> open-fixed
     
  • Aaron Madlon-Kay

    • summary: html2 filter whitespace differences in target --> HTML filter whitespace handling errors
     
  • Aaron Madlon-Kay

    • status: open-fixed --> closed-fixed
     
  • Aaron Madlon-Kay

    Released in 5.4.0.

     

Log in to post a comment.