Edgewall Software

Opened 17 years ago

Closed 17 years ago

#117 closed defect (fixed)

$$-escaping eats parts of the content

Reported by: carl Owned by: cmlenz
Priority: major Milestone: 0.4.2
Component: Template processing Version: 0.4
Keywords: Cc:

Description

I'm using the following template:

<div xmlns:py="http://genshi.edgewall.org/"
     py:with="hello='World'">
<div >
  one $hello two $$hello three $$$hello four $$$$hello
 </div>
 <div >
  one $ hello two $${ $$hello $hello } three $$$hello four $$$$ hello
 </div>
</div>

This is what I get from genshi 0.4:

<div>
<div>
  one World$World$hello
 </div>
 <div>
  one $$hello World$World$ hello
 </div>
</div>

This is what I'd like to get:

<div>
<div>
  one World two $hello three $World four $$hello
 </div>
 <div>
  one $ hello two ${ $hello World } three $World four $$$$ hello
 </div>
</div>

or in words: Don't do anything with dollar signs that's not followed by [a-zA-Z_{]. If the number of $-signs (n) is odd, reduce the number of $-signs to (n-1)/2 and do an expression substitution, if it's even just reduce the number of $-signs to n/2.

Attachments (1)

interpolation.diff (308 bytes) - added by anonymous 17 years ago.

Download all attachments as: .zip

Change History (4)

Changed 17 years ago by anonymous

comment:1 Changed 17 years ago by carl

I think I found the problem, and I have attached a patch. This will not be exactly what I wanted above, but I think I can live with it as it is now.

comment:2 Changed 17 years ago by cmlenz

  • Component changed from General to Template processing
  • Milestone changed from 0.5 to 0.4.3
  • Status changed from new to assigned

comment:3 Changed 17 years ago by cmlenz

  • Milestone changed from 0.4.3 to 0.4.2
  • Resolution set to fixed
  • Status changed from assigned to closed

Doh, this has actually already been fixed in [630] :-P

Note: See TracTickets for help on using tickets.