From b6c0054bef551dc8b1d8b90d8afa1b02b9e012ef Mon Sep 17 00:00:00 2001 From: vargenau Date: Thu, 30 May 2013 13:23:59 +0000 Subject: [PATCH] Change MangleXmlIdentifier so that the URL does end with ".", avoiding problems in mail tool git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@8793 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/stdlib.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/stdlib.php b/lib/stdlib.php index 00c008448..eb56768e9 100644 --- a/lib/stdlib.php +++ b/lib/stdlib.php @@ -125,7 +125,7 @@ if (!defined('MAX_PAGENAME_LENGTH')) { * * It does this by * converting all bytes not in [A-Za-z0-9:_-], - * and any leading byte not in [A-Za-z] to 'xbb.', + * and any leading byte not in [A-Za-z] to '.bb', * where 'bb' is the hexadecimal representation of the * character. * @@ -136,11 +136,12 @@ if (!defined('MAX_PAGENAME_LENGTH')) { */ function MangleXmlIdentifier($str) { - if (!$str) + if (!$str) { return 'empty.'; + } return preg_replace('/[^-_:A-Za-z0-9]|(?<=^)[^A-Za-z]/e', - "'x' . sprintf('%02x', ord('\\0')) . '.'", + "'.' . sprintf('%02x', ord('\\0'))", $str); } -- 2.42.0