[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] [BP][FIX] ParserLib: Prevent double-encoding of ampersands in plugin output
"Bruno Kambere \(@kambereBr\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <69b02656357d6_3b1899f818744@gitlab-sidekiq-low-urgency-cpu-bound-v2-6df5f9ffdd-dsncb.mail> |
Bruno Kambere pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki
Commits:
503f1679 by Bruno Kambere at 2026-03-10T15:59:18+02:00
[BP][FIX] ParserLib: Prevent double-encoding of ampersands in plugin output
---
* [BP][FIX] ParserLib: Prevent double-encoding of ampersands in plugin output
---
* [FIX] ParserLib: Prevent double-encoding of ampersands in plugin output
---
* [FIX] ParserLib: Prevent double-encoding of ampersands in plugin output
See merge request tikiwiki/tiki!9477
See merge request tikiwiki/tiki!9709
See merge request tikiwiki/tiki!9710
- - - - -
1 changed file:
- lib/parser/parserlib.php
Changes:
=====================================
lib/parser/parserlib.php
=====================================
@@ -129,7 +129,8 @@ class ParserLib extends TikiDb_Bridge
// cleaning some user input
// ckeditor parses several times and messes things up, we should only let it parse once
if (! $this->option['wysiwyg']) {
- $data = str_replace('&', '&', $data);
+ // Only encode ampersands that are not already part of an HTML entity
+ $data = preg_replace('/&(?![a-zA-Z0-9#]+;)/', '&', $data);
}
// oft-used characters (case insensitive)
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/503f16792e89264799727815eeb6400ebabd2e55
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/503f16792e89264799727815eeb6400ebabd2e55
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs