File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -120,15 +120,18 @@ protected function _getAjaxUrl($url, $attr) {
120
120
if (JString::endswith ($ url , "/ " ) === true ) {
121
121
$ slash = "" ;
122
122
}
123
+
123
124
if (JString::isNotNull ($ attr )) {
124
125
if ($ attr === "value " ) {
125
126
$ retour .= "url=url+' " . $ slash . "'+$(this).val(); \n" ;
126
127
} elseif ($ attr === "html " ) {
127
128
$ retour .= "url=url+' " . $ slash . "'+$(this).html(); \n" ;
128
129
} elseif (\substr ($ attr , 0 , 3 ) === "js: " ) {
129
130
$ retour .= "url=url+' " . $ slash . "'+ " . \substr ($ attr , 3 ) . "; \n" ;
130
- } elseif ($ attr !== null && $ attr !== "" )
131
- $ retour .= "url=url+' " . $ slash . "'+($(this).attr(' " . $ attr . "')||''); \n" ;
131
+ } elseif ($ attr !== null && $ attr !== "" ) {
132
+ $ retour .= "let elmUrl=$(this).attr(' " . $ attr . "')||''; " ;
133
+ $ retour .= "url=(!/^((http|https|ftp):\/\/)/.test(elmUrl))?url+' " . $ slash . "'+elmUrl:elmUrl; \n" ;
134
+ }
132
135
}
133
136
return $ retour ;
134
137
}
You can’t perform that action at this time.
0 commit comments