javascript - Best way to resolve escaped characters in a database -


i have populated mysql database outputs json data consumed , displayed via angularjs. of text strings in database have escaped quotes , double quotes like:

   have @ least bachelor\'s degree in child development? 

or

   asking children address \"ma\'am\" or \"sir\" formalize things 

the problem angularjs still displays strings escaped quotes. best way avoid this? do search , replace on database substituting escaped substrings (\',\") else? outputs displayed in angularjs ng-model directive:

    ...     <div class="bs form-group" ng-if="quiz.quizmanager.quiz.questions[quiz.activequestion].quiz_question_type === 'text'">         <input type="text" class="form-control" ng-model="quiz.quizmanager.quiz.questions[quiz.activequestion].answer"                ng-change="quiz.selectanswer(0, quiz.quizmanager.quiz.questions[quiz.activequestion].quiz_question_type)"                />     </div>     ... 

i solved doing search , replace thru sql before repopulating database


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -