On Mon, Feb 23, 2009 at 4:28 AM, Hans <[email protected]> wrote:
>
> 2009/2/22 The Editor <[email protected]>:
>>
>> I think I know what caused this. I put a BOLTstripslashes on escaped
>> output in order to allow javascript in the snippets. But here is
>> another seeming way to do it. Let me know if this doesn't solve the
>> problem for your application as well:
>> ........ [snip]
>
> Dan - your hack makes the toggle javascript work again. But I don't
> think this is the final solution.

I have had trouble with slashes. Admittedly. It's not easy because
different servers work differently. If I could find a way to turn off
php's tendency to add slashes, we could probably simplify things a lot
in the core code. We've been able to get along ok by tweaking here and
there. But it's not a perfect solution. I'm open to help.

> I had a little experiment with adding a section including javascript
> to code.snippets. I found that I could not add backslashes, they got
> removed. I think it is essential to be able to add code unaltered to a
> code page in general, and to code.snippets in particular. Backslashes
> need to be preserved. Your character handling routines need to take
> care of this automatically, without forcing an author to use special
> hacks.

Right. We're working that way. For the most part it works ok.  Have
you tried setting blockslashes: false in site.config? If your server
is not adding slashes, this may help.

> I am not sure why you use the <nolines> markup for the javascript
> snippet. It should not really be necessary. Anything in  a 'code' page
> should be treated as code. The only exceptions are the skinvar names
> and special substitution variables (i.e. skin vars) inserted into
> code.

True, and you can use code.embed.files for this--the normal way to
insert javascript.  But snippets can also contain markup, like
site.actions, so in this case at least, you should be able to process
the markup. What I should have done (haven't tested) is escaped it
like this:

[[#alert]]
/=
javascript code here
=/
[[#end]]

> One other thing about multi-line code blocks marked with [[#varname]]
> ...[[#end]]:
> Is an anchor called [[#end]] required? If it is I consider it bad
> practise, as it leads to having multiple instances of the same anchor
> name (i.e. bad HTML). Much better for a container I think is a syntax
> like
> [[#var]]
> ...
> ...
> [[#varend]]
> which make sthe ending anchor unique and tied to the starting anchor name.

Actually the pattern just looks for '[[#'  regardless. That would be
good practice.

Cheers,
Dan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to