Forum OpenACS Development: xowiki external links

Posted by Jeff Rogers on
I'm trying to create links to external sites in my xowiki page using the syntax

[[|Link Title]]

But it's not working.  Instead it gives me a link to create a new folder; it seems to be acting (based on a debug statement I added to create_link) as if I put in the page something like

[[<a href="|Link">|Link</a> Title]]

almost as if it was making the http://whatever into a link before processing the wiki tags.  I didn't see anything in the xowiki parameters to alter that behavior.

I'm using xowiki 0.143 as far as I can tell.

3: Re: xowiki external links (response to 1)
Posted by Gustaf Neumann on
Hi Jeff,

My guess is, that you edited the page with xinha, and xinha replaced the external link by a link markup. Edit the page, switch to the html source code representation and enter there the external link in wiki syntax. i have just tried it on my notebook and it works fine.

xinha has a parameter to turn the behavior off.

2: Re: xowiki external links (response to 1)
Posted by Victor Guerra on
Dear Jeff,

After digging a bit I noticed that the behavior you mentioned happens when the format of the content on your xowiki page is text/enhanced. I assume the parameter UseHtmlAreaForRichtextP is set to 0 on your installation, otherwise the format would be text/html automatically.

So if you change the format of the content to any other value ( text/plain text/fixed-width or text/html) double brackets are working as expected. In cases when the content of a xowiki page's format is text/enhanced it is converted to normal HTML using ad_enhanced_text_to_html ( take a look at the proc substitute_markup on the ::xowiki::Page class - xowiki/tcl/xowiki-procs.tcl ) before doing any kind of substitutions on the content.

I hope this helps.


4: Re: xowiki external links (response to 2)
Posted by Jeff Rogers on
Yep, that was exactly the problem. I didn't read the basic description of xowiki closely enough and I was thinking in terms of traditional wiki-esque markup rather than the richtext approach of xowiki. The behavior was surprising for me, but it's working ok now.