Skip to content

xmlns:togglz attribute doesn't get filtered and it leaks to the html document #10

@php-coder

Description

@php-coder

I have the following template:

<html lang="en"
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:th="http://www.thymeleaf.org"
        xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"
        xmlns:togglz="https://github.com/heneke/thymeleaf-extras-togglz">

after processing it produces the following HTML:

<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
	xmlns:togglz="https://github.com/heneke/thymeleaf-extras-togglz">

Notice that xmlns:togglz attribute is still here while it shouldn't be. At the same time, xmlns:sec was processed correctly. I found that it registers additional dialect that we don't: StandardXmlNsTagProcessor

Here is also the issue that says that "As of 3.0 there is no mechanism in the engine itself to continuously look for xmlns attributes and remove them. It becomes the responsibility of the dialects to do so".

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