Forum closed. New forum available at http://community.wymeditor.org/

Relative URLs in hyperlinks

Discuss features, code, contributions, ideas, suggestions, ...
For bugs, patches and feature requests, please post on the Trac:
http://trac.wymeditor.org/

Relative URLs in hyperlinks

Postby nickbambridge on Tue Jan 26, 2010 4:04 pm

This is relatively untested, but I've found that by changing the following line of code, I was able to add relative urls as links in wymeditor.

backup then open:
wymeditor/jquery.wymeditor.min.js

find:
var sUrl=jQuery(wym._options.hrefSelector).val();

replace with:
var sUrl=jQuery(wym._options.hrefSelector);

I accept this is probably not an ideal solution, as it appears to be removing the 'validation' part of adding a link url, but it seems to work all right.

Warning:
This is only for urls in hyperlinks - not for image filepaths and such.
This may allow your users to add crap to your pages in the hrefs of links.
Always make a backup first.
nickbambridge
 
Posts: 1
Joined: Tue Jan 26, 2010 3:53 pm

Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest