We have textarea:
<textarea ng-init="testConditionEdit='<?php echo htmlentities(Tests::getTestCondition($idBlock));?>'" ng-model="testConditionEdit"></textarea> We load a certain html block from the database into the model in the ng-init directive, which may have different special characters, etc. The htmlentities function helped to convert special characters. But I got a block on which an error appears in the console
Here is this html block:
<p style="font-family:'Pt Sans', Arial, sans-serif; font-size: 15px; font-style: normal; "> 8. Эксплуатация</p> Swears on 'Pt Sans' . I understand that it is correct to pull data into a model not in a view, but as a kind of an angulyar service in the form of jsona. Is there a way to convert a block so that there is no syntax in html itself?
style="font-family:'Pt Sans'- This is an example of content that is loaded from the database. The content may be different. Someone copied the text from Wikipedia, for example. It was saved in the database in this form, and it needs to be pulled into the model - Igor Baranyuk