![]() |
|
#1
|
|||
|
|||
|
Is there a way to use these? Perhaps an escape character?
Thanks! |
|
#2
|
|||
|
|||
|
Hi James,
To use [ you must use [[ and for ] use ]] - this is the way I chose to escape them, Code:
"this text will be in the [ header "
__________________
Javascript tooltips / popups |
|
#3
|
|||
|
|||
|
hmmm
When I tried doing this: [[x]]Example 1[[/x]] it was displayed like this: [x]Example 1[[/x]] I tried: [[x]]Example 1[/x] but that was cut off at the first b. Thanks!! |
|
#4
|
|||
|
|||
|
I'm getting the same thing as well.
It appears that the code only displays [ for [[ and ] for ]] once, then doesn't do it again. Edit: I think I found the code Quote:
Last edited by Vindexus : 02-23-2007 at 10:13 PM. |
|
#5
|
|||
|
|||
|
You're accurate, replace() only does one occurrence, by design. Standard regular expression syntax applies.
...replace(/[[/g, '[') and ...replace(/]]/g,']') should do the trick, appending the global option 'g' -K |
|
#6
|
|||
|
|||
|
That doesn't work for me. When I use multiple [[ and ]] pairs substitution doesn't catch them all, even with the /[[/g pattern. I'm not familiar enough with Javascript to suggest a fix yet. Should I come up with one I'll post it. I suspect that multiple [[ and/or ]] pairs messes up the initial regexp of the function getParam.
Why not escape [ and ] with a backslash? Or perhaps a &lbr; and &rbr;? I suppose we can do whatever we like because we have the source but I'm curious about the reasoning. This minor issue aside I'm very happy with boxover, thanks for making it available! |
|
#7
|
|||
|
|||
|
Still no solution for this ?
BoxOver is nice, but for me this is blocking for using it... |
|
#8
|
|||
|
|||
|
It's really taking the above and putting it to work, but i figured i'd post it for anyone who cares
php code snippet: Code:
Code:
Enjoy, SD |
![]() |
| Thread Tools | |
| Display Modes | |
|
|