TinyButStrong - the PHP Template Engine
Categories > TinyButStrong general >

html select and value <20 not working

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

By: Peter
Date: 2013-09-30
Time: 16:52

html select and value <20 not working

If have havlues with an < in there it does not slect the option. How can i prevent this?

 
<select name="filterset[[filter.$]][]" multiple>
                <option value="">--- nicht gew√§hlt ---</option>
                <option value="[filter_sub1.val]">[filter_sub1.val;block=option]</option>
                <option>[settedFilter.[filter.$];ope=html;select;noerr]</option>
</select>

 


Array
(
    [0] => Array
        (
            [0] => <20
        )

  

)

By: Skrol29
Date: 2013-09-30
Time: 23:37

Re: html select and value <20 not working

Hi Peter,

There was a bug in the HTML plugin for TBS.
It is fixed now, but is will be published with the next TBS release. But I can send it to you.

Nevertheless, there is a workaround: when you use MergeField() for merging 'settedFilter', then use an array of values that are converted HTML using htmlspecialchars();

I.E. :
foreach ($values as $i=>$v) {
  $values[$i] = htmlspecialchars($v);
}
$TBS->MergeField('settedFilter', $values);


By: Peter
Date: 2013-10-01
Time: 08:01

Re: html select and value <20 not working

Can you send it to me via mail?