Recent Topics

special characters in URLs?

Started by on Feb 17, 2006 – Contents updated: Feb 17, 2006

Feb 17, 2006 19:58    

I'm trying to link to something in [url=http://wikipedia.org]the Wikipedia[/url] that has parentheses in the URL ([url=http://en.wikipedia.org/wiki/Sprite_(computer_graphics)]this one[/url] if you're curious). Using [url=http://www.w3.org/MarkUp/html-spec/html-spec_13.html]this list from the w3c[/url], I learned that the markup equivalent is & # 40 ; and & # 41 ; (minus the spaces, of course) for left and right parenthesis, respectively, so I made sure to use these in the URL for validation purposes.

Unfortunately, I don't even get past the post parser, which tells me that it's an invalid URL.

Any way to get this to work?

Thanks!

Feb 18, 2006 06:15

I had some success with your URL [http://en.wikipedia.org/wiki/Sprite_(computer_graphics)] utilizing the bbcode plugin.

This should work whether you're on DAWN or v1.6 Alpha, but you're going to need to edit

  • _bbcode.renderer.php file (in /plugins/renderers) IF in Dawn ... or [*]the _bbcode.plugin.php (in /plugins) IF in v1.6 alpha [/list:u]
  • Look for

    Code

    //  '#\[url](.+?)\[/url]#is',    // URL
                      //  '#\[url=(.+?)](.+?)\[/url]#is',
    in the $search=array() ... uncomment, by removing the "//" double slashes, at the beginning of the two lines ...
    then look for

    Code

    //  '<a href="$1">$1</a>',    // URL
                      //  '<a href="$1" title="$2">$2</a>',
    in the $replace=array() ... and again, uncomment.

    (The lines should be similar, no matter which version you're on).

    Then, make sure that the plugin is installed (if using v1.6) ... and that the "BB Code" is checked, in the Back Office (Edit Pane), in either version.

    Then, in your post, add the link as

    Code

    [url=http://en.wikipedia.org/wiki/Sprite_(computer_graphics)]text you want[/url]

    Worked for me in both versions.

    Hope this helps!

    PS ... Note that this is a work-a-round. Frankly, if it's a VALID URL (which it is) ... the HTML-checker should pass it. The fact that it doesn't, is a BUG and you should report it as such. ;)


Form is loading...

multi-blog platform – This forum is powered by b2evolution CMS, a complete engine for your website.