[Request] Remove Inverted Commas from BBcode
#11
I'm sorry but you have lost me with the editor.
Reply
#12
(2013-08-15, 10:16 PM)imagey Wrote: Ok i've got it to become click-able, but its loading a page on my forum instead of taking me to the website.

Regular expression: \[url="(.*?)\"](.*?)\[/url\]

Replacement: <a href="\1">\2</a>

If i do a link like
[url="www.google.com"]google[/url]

It takes me to http://myforum.com/www.google.com instead of taking me directly to google.com

The syntax for MyCode replacements is $1, $2, $3, etc, not \1, \2, \3. So, try this:

Regular expression: \[url="(.*?)\"](.*?)\[/url\]

Replacement: <a href="$1">$2</a>
Please don't PM me for support. Smile
Reply
#13
That gave me the same results as with the one I used above.

http://mysite.com/www.google.com
Reply
#14
(2013-08-15, 10:16 PM)imagey Wrote: Ok i've got it to become click-able, but its loading a page on my forum instead of taking me to the website.

Regular expression: \[url="(.*?)\"](.*?)\[/url\]

Replacement: <a href="\1">\2</a>

If i do a link like
[url="www.google.com"]google[/url]

It takes me to http://myforum.com/www.google.com instead of taking me directly to google.com

Since you did not provide a protocol in the URL, it gets resolved relative to the current page. You should almost always use an absolute URL.

www.google.com => http://myforum.com/www.google.com
http://www.google.com => http://www.google.com
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)