#3461 closed defect (worksforme)
bug in HTML tag parsing
| Reported by: | anonymous | Owned by: | Jonas Borgström |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | general | Version: | 0.9.3 |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
If a message is quoted in an HTML box as follows:
<div style="height:150px; overflow:auto; border: 1px solid #000000"> <pre> From: John Doe <jdoe@…> Subject: Test
This is a test message. </pre> </div>
then there is a problem in that the <jdoe@…> part is interpreted as an HTML tag, although it should not be, since it is between <pre></pre> tags. As a result, the error "HTML parsing error: malformed start tag" is generated by trac.
Attachments (0)
Change History (4)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
| Resolution: | → worksforme |
|---|---|
| Status: | new → closed |
<pre> blocks are not the way to quote special HTML characters. Use <, > and & for that.
e.g.
{{{
#!html
<div style="height:150px; overflow:auto; border: 1px solid #000000">
<pre>
From: John Doe <jdoe@yahoo.com>
Subject: Test
This is a test message. </pre> </div>
}}}
which renders as:
From: John Doe <jdoe@yahoo.com> Subject: Test This is a test message.
comment:3 by , 19 years ago
I would add, however, that this is rather inconvenient. If one wants simply to copy and paste an email, or any text for that matter which may happen to have < > pairs in it, into a scrollable textbox, there is no easy way to do this outside of manually modifying each "invalid" < > pair.
comment:4 by , 19 years ago
Maybe in this case, a more convenient alternative would be:
{{{
#!html
<div style="height:150px; overflow:auto; border: 1px solid #000000">
<pre>
}}}
From: John Doe <jdoe@yahoo.com>
Subject: Test
This is a test message.
{{{
#!html
</pre>
</div>
}}}
Which renders as:
From: John Doe <jdoe@…> Subject: Test
This is a test message.



If not already clear, the complete wiki code used for the test case is: