# HG changeset patch # User Dan # Date 1248882534 14400 # Node ID 4ef865b5f497a422400ca2c2768813e52889f33b # Parent d3e12f1f9f291632f0888588192e3eea4095b566 Tweaked URL sanitizing a bit to make Enanium work better. diff -r d3e12f1f9f29 -r 4ef865b5f497 includes/functions.php --- a/includes/functions.php Wed Jul 29 10:48:43 2009 -0400 +++ b/includes/functions.php Wed Jul 29 11:48:54 2009 -0400 @@ -2512,7 +2512,7 @@ // Remove character escapes $page_id = dirtify_page_id($page_id); - $pid_clean = preg_replace('/[\w\.\/:;\(\)@\[\]_-]/', 'X', $page_id); + $pid_clean = preg_replace('/[\w\.\/:;\(\)@\[\]=_-]/', 'X', $page_id); $pid_dirty = enano_str_split($pid_clean, 1); foreach ( $pid_dirty as $id => $char ) @@ -2577,7 +2577,7 @@ $char = strtolower($char); $char = intval(hexdec($char)); $char = chr($char); - if ( preg_match('/^[\w\.\/:;\(\)@\[\]_-]$/', $char) ) + if ( preg_match('/^[\w\.\/:;\(\)@\[\]=_-]$/', $char) ) continue; $page_id = str_replace($matches[0][$id], $char, $page_id); } diff -r d3e12f1f9f29 -r 4ef865b5f497 includes/template.php --- a/includes/template.php Wed Jul 29 10:48:43 2009 -0400 +++ b/includes/template.php Wed Jul 29 11:48:54 2009 -0400 @@ -1771,7 +1771,7 @@ $params = false; $escape = !empty($escape); - $result = makeUrlNS($namespace, $page_id, $params, $escape); + $result = makeUrlNS($namespace, sanitize_page_id($page_id), $params, $escape); if ( !$post_eval ) {