Announcement

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

#1 2009-11-23 14:34:56

alex67
New member
Registered: 2009-10-15
Posts: 5

xinha remove some tags

Hello.
this code :

<a href="site-accueil.html" {active_link_accueil}>Presentation</a>

is rewrited by xinha in

<a href="site-accueil.html">Presentation</a>

So. Xinha remove tag {active_link_accueil}

why ?
Thx for all.
Alex.

Offline

#2 2009-11-23 14:57:26

ateslik
Xinha Community Member
Registered: 2009-07-16
Posts: 33

Re: xinha remove some tags

That is not valid HTML. Why do you have that string in your markup?

Offline

#3 2009-11-23 15:10:47

alex67
New member
Registered: 2009-10-15
Posts: 5

Re: xinha remove some tags

because it's a template.
i'm using {var_name} to display some value...

Offline

#4 2009-11-23 15:11:55

alex67
New member
Registered: 2009-10-15
Posts: 5

Re: xinha remove some tags

one little precision.
this :

<div>{content}</div>

or

<div id="{content}">{content}</div>

work fine !

Last edited by alex67 (2009-11-23 15:21:26)

Offline

#5 2009-11-23 20:00:56

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: xinha remove some tags

Xinha is for editing HTML.  As ateslik pointed out, your syntax

<a href="site-accueil.html" {active_link_accueil}>Presentation</a>

is not valid HTML, and so Xinha (well, the web browser actually) is most likely to destroy it.

Your second examples:

<div>{content}</div>
<div id="{content}">{content}</div>

are (more or less) valid HTML, so Xinha should have no problem with them (although using a brace mark ( { } ) in an id is possibly not legitimate, but likely works anyway).


James Sleeman

Offline

#6 2009-11-24 04:34:47

alex67
New member
Registered: 2009-10-15
Posts: 5

Re: xinha remove some tags

can i edit one regex and remove char {} ?

Offline

#7 2009-11-24 07:42:48

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: xinha remove some tags

I do not understand your question.


James Sleeman

Offline

#8 2009-11-25 12:03:15

Practicality
Xinha Community Member
Registered: 2007-02-15
Posts: 24

Re: xinha remove some tags

Alex, we do something similar. Whatever you are using to process {content} tags, do that processing before the html gets passed to Xhina. If necessary you can do the reverse on save.

IE, if this is template code, just put some fake template code that would always be the same. So, {content} becomes, <p>This is the template content<p> and {active_link_accueil} becomes: class="active" (or whatever class you are trying to put there).

That should take care of the issue.

Last edited by Practicality (2009-11-25 12:07:09)

Offline

Board footer

Powered by FluxBB