[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX] WantedPages: Ensure semantic links (token(Page)) are ignored within \~np\~ tags
"ushindi bienvenu \(@usbbush\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <69d15972bf784_3b49625a4174fe@gitlab-sidekiq-low-urgency-cpu-bound-v2-664f654ff4-58mw7.mail> |
ushindi bienvenu pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki
Commits:
a31f9364 by Landry Bitege at 2026-04-04T18:25:21+00:00
[BP][FIX] WantedPages: Ensure semantic links (token(Page)) are ignored within \~np\~ tags
---
* [FIX] WantedPages: Ensure semantic links (token(Page)) are ignored within \~np\~ tags
---
* [FIX] WantedPages: Ensure semantic links (token(Page)) are ignored within \~np\~ tags
---
* [FIX] WantedPages: Ensure semantic links (token(Page)) are ignored within ~np~ tags
See merge request tikiwiki/tiki!9617
(cherry picked from commit a37515693502ce51d8a23511b365bf39110d8e58)
See merge request tikiwiki/tiki!9898
(cherry picked from commit 524a8c8c94256a90c5c826199057413cd71ea776)
See merge request tikiwiki/tiki!9912
- - - - -
1 changed file:
- lib/wiki-plugins/wikiplugin_wantedpages.php
Changes:
=====================================
lib/wiki-plugins/wikiplugin_wantedpages.php
=====================================
@@ -173,8 +173,9 @@ class WikiPluginWantedPages extends PluginsLib
}
// Check if link is wrapped in ~np~ tags (exact or partial matches within np blocks)
- // Pattern: ~np~...((PageName))...~/np~
- $escapedPattern = '/~np~[^~]*?\(\(' . preg_quote($toPage, '/') . '\)\).*?~\/np~/s';
+ // Pattern: ~np~...((PageName))...~/np~ and ~np~...(...(PageName))...~/np~
+ $quotedPage = preg_quote($toPage, '/');
+ $escapedPattern = '/~np~[^~]*?\((?:[a-zA-Z0-9_-]+)?\(' . $quotedPage . '\)\).*?~\/np~/s';
return preg_match($escapedPattern, $fromPageContent) === 1;
}
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a31f93649662de6e9f9ad222a7d3c12de9cc3c2e
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a31f93649662de6e9f9ad222a7d3c12de9cc3c2e
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