1

What is the correct way to make an unsafe bind to an attribute? In my case, I get undesired HTML entities in the title-attribute:

<a href="..." title="Something &quot;goes bad&quot;">Link</a>

(Angular 1.1.5)

3
  • be more specific about source of title and problem as it is now Commented Nov 1, 2013 at 11:51
  • I think my question is clear enough. I need to force the same behavior as the directive ng-bind-html-unsafe has, only for an attribute. Commented Nov 3, 2013 at 11:21
  • no you haven't....it displays properly in browser. Can think you've been clear enough with one sentence question that so far hasn't made sense...but won't get a lot of help around here without defining issues in detail Commented Nov 3, 2013 at 14:08

1 Answer 1

2

&quot; is how " is escaped in HTML (and XML) attributes, there's no way around it. It will display correctly on the page, however. Attribute contents aren't parsed as HTML so there's no need for an equivalent to bind-html-unsafe.

Sign up to request clarification or add additional context in comments.

2 Comments

It's wrong, in the database stands: "&quot;", after the Output it should be "", but it is still a &quot;. It is due to Angular's $sanitize Service.
Or, if they are not parsed as HTML, we maybe need a way to display " there, and maybe this question has just nothing to do with Angular?..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.