You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by sn...@apache.org on 2015/03/01 19:09:46 UTC
svn commit: r1663142 -
/roller/trunk/app/src/main/webapp/themes/gaurav/entry.vm
Author: snoopdave
Date: Sun Mar 1 18:09:45 2015
New Revision: 1663142
URL: http://svn.apache.org/r1663142
Log:
Fix for ROL-2066 Commentors can't leave a comment using URL begins with https:// in Gaurav theme
Modified:
roller/trunk/app/src/main/webapp/themes/gaurav/entry.vm
Modified: roller/trunk/app/src/main/webapp/themes/gaurav/entry.vm
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/themes/gaurav/entry.vm?rev=1663142&r1=1663141&r2=1663142&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/themes/gaurav/entry.vm (original)
+++ roller/trunk/app/src/main/webapp/themes/gaurav/entry.vm Sun Mar 1 18:09:45 2015
@@ -180,8 +180,8 @@
}
function fixURL(theForm) {
- if (theForm.url.value != "" &&
- theForm.url.value.indexOf("http://") == -1) { //prepend http://
+ if (theForm.url.value != "" && !/^\S+:\/\//.test(theForm.url.value)) {
+ // URL has no scheme so prepend http://
theForm.url.value = "http://"+theForm.url.value;
}
saveUserInformation(theForm);