> How did you generate the link you have used, in IE?
TW currently *does* generate permalinks with the %5B and %5D encoded
characters. However, FF3 (but not FF2) automatically decodes these
when setting the permalink string into the URL field of the browser.
The other major browsers (IE, Safari, Opera, Chrome) leave the encoded
brackets as-is, allowing it to be easily copied and pasted into
tiddler content (or other documents, email messages, etc)
> Im not sure I can
> consider FF the issue, a link can contain [ or ]
How often can do square brackets actually appear in URLs other than a
TiddlyWiki permalink? ... and are they usually *matched* brackets
(i.e., each "[" has a corresponding "]" ).
> therefore it ought to
> be up to the wiki code interpreter to determine where the start and
> end of the link is when it has square brackets included.
That's the ideal... note, however, that tweaking the TW parser is a
bit tricky... it's based on using regular expressions to match
specific syntax sequences. Here's the current regexp for parsing a
tiddlylink:
/\[\[(.*?)(?:\|(~)?(.*?))?\]\]/
Note the second occurence of (.*?)... this is where the URL would be
matched. Also note that the terminating sequence for the entire
PrettyLink syntax is two close brackets in a row ("\]\]"). Thus, as
currently written, a URL *can* contain single open/close brackets...
or even multiple open brackets in a row... but *not* multiple close
brackets in a row (because that would signal the end of the PrettyLink
syntax).
This is what leads to the problem you encountered when trying to
create an external PrettyLink to a TW permaview URL. If FF3 left the
brackets encoded, it would be easier to copy/paste the permalink URL
into a PrettyLink syntax.
Of course, it might be possible to extend the PrettyLink regexp to
account for the un-encoded brackets, but hacking regexp almost always
gives me a nosebleed :-(
enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" 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/TiddlyWikiDev?hl=en
-~----------~----~----~----~------~----~------~--~---