Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

"Skip Tags" is not working reliably #44

Open
patschi opened this issue Dec 5, 2020 · 1 comment
Open

"Skip Tags" is not working reliably #44

patschi opened this issue Dec 5, 2020 · 1 comment

Comments

@patschi
Copy link

patschi commented Dec 5, 2020

The Skip Tags functionality is great and offers e.g. to strip <pre> tags - which might contain code which should not be read - away from the audio. However the current code in use is completely unreliable and does not strip the tag and its content away:

foreach ($skip_tags_array as $value) {
$text = preg_replace('/<' . $value . '>(\s*?)(.*?)(\s*?)<\/' . $value . '>/', '', $text);
}

So I've replaced the above line to following:

$text = preg_replace('@<('. $value .')\b.*?>.*?</\1>@si', '', $text);

(Source - "User Contributed Notes")

And this works just brilliant as I'd expect this kind of functionality. This removes the tag itself, including the content, what it should be supposed to do.

@LIJE
Copy link

LIJE commented Jan 30, 2022

Hi,

This is not working for me on the latest version. It keeps reading the image alt textes.
Have you got another solution?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants