Permalink
Browse files

Yet more spaces.

  • Loading branch information...
1 parent 58d8f0c commit 1e2578556fc4763900c9d9dabe893061fadb2c45 @elinw elinw committed Dec 9, 2011
Showing with 8 additions and 9 deletions.
  1. +3 −4 libraries/joomla/form/fields/url.php
  2. +5 −5 libraries/joomla/form/form.php
@@ -52,19 +52,18 @@ protected function getInput()
$class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
$disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : '';
$readonly = ((string) $this->element['readonly'] == 'true') ? ' readonly="readonly"' : '';
- $maxLength = $this->element['maxlength'] ? ' maxlength="' . (int) $this->element['maxlength'].'"' : '';
+ $maxLength = $this->element['maxlength'] ? ' maxlength="' . (int) $this->element['maxlength'] . '"' : '';
// Element to assume of relative URLs without protocols are local. If not set or false, URLS
// without protocols are assumed to be external (with some exceptions based on string matching).
// Do not use if you intend to use the URL rule to validate.
$relative = ((string) $this->element['relative'] == 'true') ? ' relative="relative"' : '';
-
// Initialize JavaScript field attributes.
$onchange = $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : '';
- return '<input type="text" name="'. $this->name . '" id="' . $this->id . '"' .
+ return '<input type="text" name="' . $this->name . '" id="' . $this->id . '"' .
' value="' . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '"' .
$class . $size . $disabled . $relative . $readonly . $onchange . $maxLength . '/>';
- }
+ }
}
@@ -1248,28 +1248,28 @@ protected function filterField($element, $value)
$value = JFilterInput::getInstance()->clean($value, 'html');
$value = trim($value);
// Check for a protocol
- $protocol = parse_url($value,PHP_URL_SCHEME);
+ $protocol = parse_url($value, PHP_URL_SCHEME);
// If there is no protocol and the relative option is not specified,
// we assume that it is an external URL and prepend http://.
if (($element['type'] == 'url' && !$protocol && !$element['relative'])
|| (!$element['type'] == 'url' && !$protocol))
{
$protocol = 'http';
// If it looks like an internal link, then add the root.
- if (substr($value,0) == 'index.php')
+ if (substr($value, 0) == 'index.php')
{
$value = JURI::root() . $value;
}
// Otherwise we treat it is an external link.
// Put the url back together.
- $value = $protocol .'://'. ltrim($value,$protocol);
+ $value = $protocol . '://' . ltrim($value, $protocol);
}
// If relative URLS are allowed we assume that URLs without protocols are internal.
- elseif (!$protocol && $element['relative'] )
+ elseif (!$protocol && $element['relative'])
{
$host = JURI::getInstance('SERVER')->gethost();
// If it starts with the host string, just prepend the protocol.
- if (substr($value,0) == $host)
+ if (substr($value, 0) == $host)
{
$value = 'http://' . $value;
}

0 comments on commit 1e25785

Please sign in to comment.