Skip to content

Regression: link_rel returns string when None value is passed in options normalization #60

@Pantzan

Description

@Pantzan

It looks like the latest changes of handling django-nh3 settings introduced a regression. link_rel option when None or the config is not set, passes "None" string value to nh3 resulting a incorrect tag for a tags. For example, <a> tags. <a href="some_link"> </a> becomes <a href="some_link" rel="None"> </a> which is an invalid tag and will be ignored from engines. Nh3 also allows to disable the default attribute value for rel attribute when None is passed. An empty string option "" can configure nh3 to drop link_rel, however for readability, clarity and adapting to former Bleach, None option is better in my opinion as an option.

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