Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#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 anonymous, 18 years ago

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

From: John Doe 

comment:2 by Christian Boos, 18 years ago

Resolution: worksforme
Status: newclosed

<pre> blocks are not the way to quote special HTML characters. Use &lt;, &gt; and &amp; for that.

e.g.

{{{
#!html
<div style="height:150px; overflow:auto; border: 1px solid #000000"> 
<pre> 
From: John Doe &lt;jdoe@yahoo.com&gt; 
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 anonymous, 18 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 Christian Boos, 18 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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.