Alexander Nazarov (nfokz) wrote in changelog,
Alexander Nazarov
nfokz
changelog

[livejournal] r22617: LJSUP-13247: Link Field on Image Editing...

Committer: anazarov
LJSUP-13247: Link Field on Image Editing Dialog & Insert Link Dialog
U   trunk/htdocs/js/ck/plugins/livejournal/plugin.js
Modified: trunk/htdocs/js/ck/plugins/livejournal/plugin.js
===================================================================
--- trunk/htdocs/js/ck/plugins/livejournal/plugin.js	2012-08-10 08:38:08 UTC (rev 22616)
+++ trunk/htdocs/js/ck/plugins/livejournal/plugin.js	2012-08-10 12:05:26 UTC (rev 22617)
@@ -742,6 +742,7 @@
 					// image link
 					var parent = selected && selected.getParent();
 					if (data.link) {
+						data.link = data.link.replace(/^[\s\t]*(?:http:\/\/)?/, 'http://');
 						// change parent link if exists
 						if (parent && parent.getName() === 'a') {
 							parent.setAttribute('href', data.link);

Tags: anazarov, js, livejournal, nfokz
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments