Fixed the URL data type in the forms package so it doesn't auto-add the http:// if a macro is present in the URL.
This commit is contained in:
parent
bc8697fabf
commit
dd9dfb67d9
1 changed files with 2 additions and 1 deletions
|
|
@ -1134,7 +1134,8 @@ sub url {
|
|||
$extras = shift;
|
||||
$subtext = shift;
|
||||
$size = shift || $session{setting}{textBoxSize} || 30;
|
||||
$output = '<script language="JavaScript">function addHTTP(element) {if (!element.value.match(":\/\/") && element.value != "")
|
||||
$output = '<script language="JavaScript">function addHTTP(element) {
|
||||
if (!element.value.match(":\/\/") && !element.value.match("\\\^") && element.value != "")
|
||||
{ element.value = "http://"+element.value}}</script>';
|
||||
$output .= '<input type="text" name="'.$name.'" value="'.$value.'" size="'.
|
||||
$size.'" maxlength="'.$maxLength.'" onBlur="addHTTP(this.form.'.$name.')" '.$extras.'>';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue