Skip to content

Commit

Permalink
The {thisurl_enc} tag is now compliant with RFC 3986.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-milette committed Jul 23, 2024
1 parent fa0c46e commit afc4007
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit afc4007

Please sign in to comment.