Categories > TinyButStrong general >

marker conflict

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: eLiNK
Date: 2004-09-09
Time: 08:55

marker conflict

Hi,

I'm trying to integrate a guest book script into my homepage. It makes use of both templates and MySql. So, the parentheses '{}' are used for the templates as markers, and brackets '[]' are used for MySql entries.

The left bracket gets cut out by tbs and replaced with [. As a result the JavaScript code doesn't work.

Is there a simple way to resolve the conflict?
I understand I could redefine the tbs marker, what other markers can I use to possible avoid a similar problem in the future?

Are brackets obligatory with MySql elements?
By: eLiNK
Date: 2004-09-09
Time: 10:13

Re: marker conflict

just wanted to make clear to avoid possible misunderstanding.
Strictly speaking, the brackets are contained in the JavaScript code,
the purpose of which is to take values entered from a form and give them on to the guest book script, which makes neccessary entries into the MySql database.
At this point, I guess it is not really important if MySql is used or not.
By: Skrol29
Date: 2004-09-09
Time: 10:40

Re: marker conflict

Hi,

There's an answer about that in the FAQ at the support page.

'[' characters that come from merged data are protected by replacing them with their Html conversion '['. This is a security feature to avoid data entered by users to become an active TBS tag.
You can cancel this protection tag by tag using parameter 'protect'.
By: bunak
Date: 2006-04-28
Time: 09:02

Re: marker conflict

Skrol, please help me how may I do it. In template I have JS with code
alert(row.cells[0].....

may i have protect it by adding paramater protect?
i.e.
alert(row.cells[0;protect=yes].....


this doesn't work

Thanks
By: Skrol29
Date: 2006-04-28
Time: 14:44

Re: marker conflict

Hello,

TBS protection is needed only for data items coming from outside the template and merged into the template.

For example, the following piece of template is protected:
bla bla [var.txt] bla bla

To unprotect it:
bla bla [var.txt;protect=no] bla bla

TBS doesn't matter charracters "[" and "]" which are not corresponding to a searched TBS tag.
By: bunak
Date: 2006-04-29
Time: 12:09

Re: marker conflict

I think it is not true. I have javascript in template which is using array. And when I write array[index] after template merging I'll get array&91;index] and javascript doesn't work.
By: Skrol29
Date: 2006-04-29
Time: 18:14

Re: marker conflict

Hello,

What do you mean by :
  > I write array[index] after template merging
, how do you write this?