I've experimented with different content in the BlackButton.cshtml file and if I change the HTML to just be:
<div>some text</div>
then it works.
So there seems to be a problem with certain tags (it doesn't like anchors or the old b tag) or certain attributes (data-*, in this case that "role" one).
Does anyone know why this is happening? Is there a list somewhere of allowed tags and attributes? Is there a way of disabling this?
I'm also open to suggestions if there is a better way of inserting HTML snippets like this.
Partial View Macro - disallowed tags
I've created a Partial View Macro - it's pretty basic - it just creates a special link - or it would do if it worked.
My file is in Views/MacroPartials/BlackButton.cshtml and the contents are below:
However this renders out on the page like this:
Macro alias: BlackButton
I've experimented with different content in the BlackButton.cshtml file and if I change the HTML to just be:
then it works.
So there seems to be a problem with certain tags (it doesn't like anchors or the old b tag) or certain attributes (data-*, in this case that "role" one).
Does anyone know why this is happening? Is there a list somewhere of allowed tags and attributes? Is there a way of disabling this?
I'm also open to suggestions if there is a better way of inserting HTML snippets like this.
Thanks in advance for any help.
is working on a reply...