Skip to content

Existing close tags removed if tag balancing off #11

Description

@tpconway5985

I'm using the redactor WYSIWYG editor to populate HTML widgets and HTMLawed to sanitize the input before storing in the database. The problem I've found is that for widgets that include nested tags, HTMLawed is first changing all of that close tags to open during the hl_tag function and then adding close tags in the hl_balance function -- but they aren't being added in the correct place.

So, I tried turning balancing off and found that the close tags were still being changed to open tags, but since the balance function doesn't run, no close tags were added. I added a fix to my local file in hl_tag that ignores any close tags if config['balance'] is off and that seems to solve the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions