Jump to content

Disable the automatic http(s):// addition in links

Featured Replies

Posted

Which file do I need to modify to disable the automatic http:// addition when adding a URL in CKEditor?

I wanted to add a link which needs to be clickable, but does not require the http(s):// protocol.

Example: magnet:?xt=urn:btih:01010846894794babc80c20d7d4fe21540a86632.....

This is a link but if you add that to CKEditor, it will break it by automatically adding the http in front: magnet:?xt=urn:btih:01010846894794babc80c20d7d4fe21540a86632

image.thumb.png.5a2965b2e104b8bfe0f333e028dd0365.png

What do I need to edit to prevent that?

\applications\core\data\javascript.xml

			if ( !url.match( /^[a-z]+\:\/\//i ) && !url.match( /^mailto\:/i ) && !url.match( /^\#/ ) ) {
				url = 'http://' + url.replace( /^\/*/, '' );
			}

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.