Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template function returns html, the html is then stripped of it's class #888

Closed
Steveiwonder opened this issue Jan 23, 2021 · 2 comments
Closed
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@Steveiwonder
Copy link

Steveiwonder commented Jan 23, 2021

While testing this library I found an issue which seems odd.
I tested this as my template function

template: function(item, element, data){
  let html =  `<h6><i class="${item.icon}"></i>${item.content}</h6>`;
  console.log(html);
  return html;
}
}

The class from the i element is removed once it's returned, i can see in the console the html output is correct

image

but this is the elements in the dom
image

EDIT:

After some debugging it looks like a call to util.xss(content) strips the class

Thanks

Steve

@YoannChabert
Copy link

see #846

@mojoaxel mojoaxel added the bug Something isn't working label Mar 17, 2021
@mojoaxel
Copy link
Member

mojoaxel commented Mar 17, 2021

@Steveiwonder Thanks for reporting this! Let's close this as a dublicate of #846

@mojoaxel mojoaxel added the duplicate This issue or pull request already exists label Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants