Categories > TinyButStrong general >

Missing tag error

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Anthony
Date: 2016-01-18
Time: 22:14

Missing tag error

I can't seem to solve why I am getting this message on the following code:

TinyButStrong Error : can't found the end of the tag '[onshow; onformat=...'.

<tr class="ItemTemplate">
    <td class="col1"><span><img style="width: 18px; height: 12px" src="_assets/images/flags/[stats_block.country; ope=lower; if [val]='';then 'blank'].gif" title="[stats_block.country]" /></span></td>
    <td class="col2">[onshow; onformat=f_city_region; city=[stats_block.city]; region=[stats_block.region]; strconv=no]</td>
    <td class="col3">[stats_block.ip; block=tr; noerr]</td>
    <td class="col4">[stats_block.useragent; noerr]</td>
    <td class="col5">[stats_block.connect_sum; noerr]</td>
    <td class="col6">[stats_block.server; noerr]</td>
    <td class="col7 nowrap">[stats_block.lastUpdated; noerr]</td>
</tr>

Regards,
A. Brock
By: Anonymous
Date: 2016-01-21
Time: 22:40

Re: Missing tag error

I found the problem causing the error was because the database field had a single quote in it. Is there a way for TBS to deal with this issue when a single quote appears in a field?
By: Sheepy
Date: 2016-02-04
Time: 08:29

Re: Missing tag error

The problem seems to be that TBS does not escape single quote, yet it does treat single quote specially in parameters.

TBS does not seem to have a native way to solve this issue.  If you know it will not contain double quotes you can quote it in them, othewise you may need a custom format function because TBS never calls htmlspecialchars with ENT_QUOTES.