#15798: "spaceless" filter does not not honor <pre> tag formatting
----------------------------------+--------------------------------
 Reporter:  dfcode                |         Owner:  nobody
     Type:  Cleanup/optimization  |        Status:  new
Milestone:                        |     Component:  Template system
  Version:  1.3                   |      Severity:  Normal
 Keywords:  spaceless,html,pre    |  Triage Stage:  Unreviewed
Has patch:  0                     |
----------------------------------+--------------------------------
 I have a blog site where I occasionally wrap some HTML code between <PRE>
 tags to put it on display for my viewers.  I've noticed that when I apply
 the {% spaceless %} filter to my document, Django plows straight through
 the embedded HTML code with no regard for the "pre-formatted" declaration.
 An example might be:
 {{{
 <html>
   <body>
     <pre>
     <form>
       <label>This is an example of some code I want to display in indented
 form.</label>
       <input type="submit" />
     </form>
     </pre>
   </body>
 </html>
 }}}
 results in:
 {{{
 <html><body><pre><form><label>This is an example of some code I want to
 display in indented form.</label><input type="submit"
 /></form></pre></body></html>
 }}}
 and one line of code is displayed on my webpage.

 Perhaps this is intentional.  If not, I think the 'spaceless' filter
 should be programmed to recognize <pre> tags and leave the content within
 them alone.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15798>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to