Re: Interwiki support



On Wed, 2005-04-13 at 20:11 -0400, Colin Walters wrote:
> I reworked the substitution stuff; TextContent did not quote HTML (so if
> you typed like </span> in the chat things broke), and I still thought
> that doing server-side HTML generation was bad.  So I reworked it so the
> server generates XML that looks like this:
> 
> <yarrr-markup><text>See also the topic </text><topic-link>Mammals</topic-link><text>.</text>
> 
> The client still sends regular text like "See also the topic [Mammals]".  
> Perhaps in the future we will want the client to send yarrr-markup to
> the server as well.
> 
> All of the code seemed to work except that for some reason Firefox won't
> actually turn the constructed anchors into links!  I can see a node "a"
> in the DOM inspector with an href attribute, but Firefox just renders it
> as plain text.  Interestingly the "a" is lowercased, whereas everything
> else is uppercased.  I'm going to ask Chris about this tomorrow; if
> anyone knows about this help would be appreciated.

How do you send normal (not topic) links? For instance, if you type "bug
123" and we detect this and convert it to a bugzilla link. I guess we
need to add a uri-link type.

Also, personally I don't like the wiki style [] parsing in that it
removes some of the text you wrote. If you accidentally used [] for
something else (say pasted some array code) then the [] characters will
be removed. This is why i like substitutions like:
 "xxx bug 123 yyy" -> "xxx <a href='url'>bug 123</a> yyy"
They only add information, never remove it. So even if the link got
added wrongly no harm will be done.

I guess we could convert [blah] into [<a>blah</a>] though. That would
also make it obvious to new users who see this how to create such links.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an obese umbrella-wielding cop on the wrong side of the law. She's a 
cynical wisecracking snake charmer descended from a line of powerful witches. 
They fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]