From 4e868e3669daff37829f791266bf91c8baf297b4 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Wed, 12 Jan 2022 07:15:40 +0100 Subject: [PATCH] Exclude stuff betweeen input and select tags. Addresses #58 to prevent LinkTitles from interfering with the PageForms extension. Needs testing. --- NEWS.md | 8 +++++++- includes/Splitter.php | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 13b17b0..ec64a21 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 For changes prior to version 6.0.0, please see [`NEWS.old`](news.old). +## Unreleased + +### Fixed + +- Ensure compatibilty with the PageForms extension (#58) + ## [8.0.1][] - 2021-05-08 ### Fixed @@ -14,7 +20,7 @@ For changes prior to version 6.0.0, please see [`NEWS.old`](news.old). - Fixed a regression concerning `linktitles-cli` progress display that was introduced in v8.0.0. - Prevent a division-by-zero error that could occur on the LinkTitles special - page. + page (#55). - Fixed the message that is shown when linking that was triggered from the special page has been completed. diff --git a/includes/Splitter.php b/includes/Splitter.php index d6ad7f6..c1d6641 100644 --- a/includes/Splitter.php +++ b/includes/Splitter.php @@ -138,6 +138,8 @@ class Splitter { '.*?<\/syntaxhighlight>|' . // syntaxhighlight '.*?<\/gallery>|' . // gallery '|<\/div>|' . // attributes of div elements + '|' . // input tags and anything between them + '|' . // select tags and anything between them '|<\/span>|' . // attributes of span elements '[^<]*<\/file>|' . // stuff inside file elements 'style=".+?"|class=".+?"|data-sort-value=".+?"|' . // styles and classes (e.g. of wikitables)