TinyButStrong - the PHP Template Engine
Categories > TBS next version >

Probable bug with att and comments

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs

By: Rudolf
Date: 2015-06-25
Time: 15:30

Probable bug with att and comments

Hello,

I discovered an unexpected missbehaviour with the following construct (TBS 3.9.0):

              <input type="text" name="targetplace" autocomplete="off" value="[var.targetplace;noerr]" /><!--Target Place--><!--(City Place)-->
              [var.targetplacereadonly;if [val]=1;then 'disabled';else '';att=disabled;magnet=#;noerr]

When targetplacereadonly is 1 and should add the disabled="disabled" attribute to the input, this results in the following erroneous markup:

<input type="text" name="targetplace" autocomplete="off" value="Innsbruck" /><!--Target Place--><!--(City Place)-- disabled="disabled">

I hope to help you getting great TBS even stronger.

Kind regards
By: Skrol29
Date: 2015-06-25
Time: 23:38

Re: Probable bug with att and comments

Hi Rudolf,

Thanks for your post.
The TBS result is erroneous regarding to HTML because <!-- --> is a tag that cannot have attributes.
But it is no erroneous regarding to XML because <!-- --> is a malformed tag.

The solution is to code : "att=input#disabled"