Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

$sce.getTrustedHtml() returns duplicated input on iOS #5220

Closed
ahettlin opened this issue Dec 1, 2013 · 2 comments
Closed

$sce.getTrustedHtml() returns duplicated input on iOS #5220

ahettlin opened this issue Dec 1, 2013 · 2 comments

Comments

@ahettlin
Copy link

ahettlin commented Dec 1, 2013

I recently upgraded from AngularJS 1.2.0rc2 to 1.2.3. I now have this issue where getTrustedHtml returns the input value twice: a doubly-escaped version concatenated with a properly unescaped version of the input.

For example:

$sce.getTrustedHtml('Andrew's string.');

returns:

"Andrew's string.Andrew's string."

Input values without HTML entities appear to be simply duplicated in the output.

Strangely, I only see this behavior when inside my Cordova/PhoneGap application when running inside the iOS simulator. It does not appear to happen on Chrome, Firefox, IE, or Safari on a Windows desktop, nor on Chrome on OSX. I do not yet have a developer license to test on a real device.

Additionally, this affects all my ng-bind-html bindings as I assume they are using getTrustedHtml behind the scenes.

I see no errors being thrown in the console.

@caitp
Copy link
Contributor

caitp commented Dec 1, 2013

Related to #5192 / #5193

@ahettlin
Copy link
Author

ahettlin commented Dec 1, 2013

Ah. Great finds. I missed those in my research. Thanks.

@ahettlin ahettlin closed this as completed Dec 1, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants