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

"Skip Tags" is not working reliably #44

Description

@patschi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions