Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2008-05-27 10:31:53

plungerman
New member
Registered: 2007-10-29
Posts: 6

Xinha and Django template tags

greetings,

we are using Xinha with our Django projects and have found some curious behaviour when Xinha completes the editing process and passes the data on to the next step (via POST most likely).  in the Django framework, template tags, which can be used directly in HTML, are formed by using the following convention:

{% templatetagname %} or {{contextvariablename}}

when we are using a Xinha textarea for editing content stored in the database, content that has Django template tags included within it, the end result is that the { and % and } characters are encoded as their equivalent entities when the template tags appear in IMG and A HREF tags.  that is, you have %7B%7Bcontextvariablename%7D%7D instead of {{contextvariablename}}.  i have confirmed that this is the correct behaviour by going through the demo.  you can even see it happen, at least with our apps, by going between HTMLMode, that is viewing source and then going back to the wysiwyg view.

i would imagine this is good practice under normal circumstances.  we do not want this encoding to take place at this level.  can anyone point me in the right direction where i might tweak the Xinha javascript a bit to turn this feature off for our applications?  i have been digging around in the source code, but have not found the proper place to go about this.  i thought it might be the use of javascript encodeURIComponent but that does not seem to be it.

thanks in advance.

yours,

steve

Last edited by plungerman (2008-05-27 10:50:44)

Offline

#2 2008-09-24 21:03:30

ottsch
New member
Registered: 2008-09-24
Posts: 1

Re: Xinha and Django template tags

Same problem with smarty tags. Is there any way to get around this?

Thanks for your help!

Hannes.

Offline

Board footer

Powered by FluxBB