summaryrefslogtreecommitdiff
path: root/system/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/html.php4
-rw-r--r--system/helpers/valid.php6
2 files changed, 5 insertions, 5 deletions
diff --git a/system/helpers/html.php b/system/helpers/html.php
index f40c86dc..9ad20d89 100644
--- a/system/helpers/html.php
+++ b/system/helpers/html.php
@@ -2,7 +2,7 @@
/**
* HTML helper class.
*
- * $Id: html.php 4141 2009-03-29 03:30:06Z zombor $
+ * $Id: html.php 4368 2009-05-27 21:58:51Z samsoir $
*
* @package Core
* @author Kohana Team
@@ -96,7 +96,7 @@ class html_Core {
// Attributes empty? Use an empty string
.(is_array($attributes) ? html::attributes($attributes) : '').'>'
// Title empty? Use the parsed URL
- .(($title === NULL) ? $site_url : $title).'</a>';
+ .html::specialchars((($title === NULL) ? $site_url : $title), FALSE).'</a>';
}
/**
diff --git a/system/helpers/valid.php b/system/helpers/valid.php
index 610076f3..8a3583b2 100644
--- a/system/helpers/valid.php
+++ b/system/helpers/valid.php
@@ -2,7 +2,7 @@
/**
* Validation helper class.
*
- * $Id: valid.php 4187 2009-04-08 04:01:23Z zombor $
+ * $Id: valid.php 4367 2009-05-27 21:23:57Z samsoir $
*
* @package Core
* @author Kohana Team
@@ -161,13 +161,13 @@ class valid_Core {
for ($i = $length - 1; $i >= 0; $i -= 2)
{
// Add up every 2nd digit, starting from the right
- $checksum += substr($number, $i, 1);
+ $checksum += $number[$i];
}
for ($i = $length - 2; $i >= 0; $i -= 2)
{
// Add up every 2nd digit doubled, starting from the right
- $double = substr($number, $i, 1) * 2;
+ $double = $number[$i] * 2;
// Subtract 9 from the double where value is greater than 10
$checksum += ($double >= 10) ? $double - 9 : $double;