[TikiWiki-commits] [Git][tikiwiki/tiki][30.x] [FIX] WantedPages: Ensure semantic links (token(Page)) are ignored within \~np\~ tags
"Landry Bitege \(@land-bit\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <69ce0fe7756bd_3b19032055264@gitlab-sidekiq-low-urgency-cpu-bound-v2-78df9f9d69-264nx.mail> |
Landry Bitege pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki
Commits:
524a8c8c by Landry Bitege at 2026-04-02T08:34:40+02:00
[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
- - - - -
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/524a8c8c94256a90c5c826199057413cd71ea776
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/524a8c8c94256a90c5c826199057413cd71ea776
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