Skip to content

BUG: remove_attr does not remove the whole attribute if it includes spaces #474

@jChapman

Description

@jChapman

Version

  • OS: Window
  • Browser: Chrome
  • Web Clipper version: 0.11.7

Describe the bug

When using remove_attr on a div that has multiple classes defined in the class attribute it instead only removes the first class and leaves the rest

'

'|remove_attr:"class" -> <div two">

Expected behavior

'

'|remove_attr:"class" ->

URLs where the bug occurs

https://obsidian.md/ (many others, anything that uses tailwind has a ton of classes)

To reproduce

Your template file

{{selectorHtml:div|remove_attr:"class"}}

or

{{selectorHtml:div|nth:2|remove_attr:"class"}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions