diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c0da3c..cb838ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file. ### Updated - Added more documentation to README.md. - Fixed links and updated table of contents in README.md. +- The {thisurl_enc} tag is now compliant with RFC 3986. - {categories0} tag now shows hidden categories if role has moodle/category:viewhiddencategories. - {categories0menu} tag now shows hidden categories if role has moodle/category:viewhiddencategories. - Fixed a couple of PHP 5.6 compatibility issues. Note that unit tests are still only compatible with PHP 7.1 and later. diff --git a/filter.php b/filter.php index cfca911..9d21527 100644 --- a/filter.php +++ b/filter.php @@ -1699,7 +1699,7 @@ public function filter($text, array $options = []) { // Description: Complete URL of the current page - URL encoded for use as a parameter of a URL. // Parameters: None. if (stripos($text, '{thisurl_enc}') !== false) { - $replace['/\{thisurl_enc\}/i'] = urlencode($url); + $replace['/\{thisurl_enc\}/i'] = rawurlencode($url); } }