[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] WantedPages: Ensure semantic links (token(Page)) are ignored within \~np\~ tags

"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <69ca1df09d117_3b19924017315@gitlab-sidekiq-low-urgency-cpu-bound-v2-5c9f55b86f-nr4w8.mail>

Victor Emanouilov pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
a3751569 by Landry Bitege at 2026-03-30T06:45:54+00: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

See merge request tikiwiki/tiki!9617

- - - - -


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/a37515693502ce51d8a23511b365bf39110d8e58

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a37515693502ce51d8a23511b365bf39110d8e58
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.