Atozed Forums

Full Version: IW 15.0.17 tempalte control tags with - inside attribute names.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
IntraWeb 15 release notes mention: "Templates: Attributes are allowed inside template control tags". This means that the following works great:

{%IWEDIT1 placeholder="something"%}

This becomes the following (styles removed for readability):

<input CLASS="IWEDIT1CSS" ID="IWEDIT1" NAME="IWEDIT1" placeholder="Actie-ID" TabIndex="1" TYPE="TEXT" VALUE="IWEdit1">

However, if I add the following attribute inside a template control tag:


{%IWEDIT1 data-dom="test" placeholder="something"%}

Then the resulting HTML tag becomes as follows:

<input CLASS="IWEDIT1CSS" data="" ID="IWEDIT1" NAME="IWEDIT1" TabIndex="1" TYPE="TEXT" VALUE="IWEdit1">

It looks like everything after the - in data is removed, including the placeholder tag.

Is there a way to include attributes that contain a - character??

Thanks in advance!

Groetjes, Bob Swart
Hi Bob,

I have to test it myself before giving you a precise answer, but seems to me that the parser is choking somewhere when parsing the control tag. Very likely to be a bug. I'll test it and let you know ASAP, OK?

Thanks for your report.

Cheers
Hi Dr. Bob!

this has been fixed in our code base and should be available in the next release. Probably tomorrow...

Kind regards,
(01-27-2019, 02:00 AM)Alexandre Machado Wrote: [ -> ]Hi Dr. Bob!

this has been fixed in our code base and should be available in the next release. Probably tomorrow...

Kind regards,

Hi Alexandre,

A fix would be awesome. Thanks very much. Any idea when the next release will be available? Again, thanks very much!

Groetjes, Bob Swart
IW 15.0.18 was released, with fix for this issue. Unfortunately, while it works for one tag with a dash, it fails for the second dash character:

{%TIWGRIDACTIES data-searching="true" data-dom="fBrtp"%}

This becomes

<div class="TIWGRIDACTIESCSS" data="" data-searching="true" id="TIWGRIDACTIES" style="position: relative;">
...
</div>

Where the data-dom is removed unfortunately...
Thanks. We will check this again.

FWIW the template processor source ships, so you can even clone it and make it do whatever you want. But this appearing to be a bug we will check, so no worries.
Thanks for looking into this.

I didn't know that the source code was available. Where do we have to look for the template processor source?

Groetjes, Bob Swart