我正在尝试使用html解码来解码文本区域中的特殊字符
已在angularJS模块中定义了
angular.module('app').filter('htmldecode', function(){
return function(encodedHtml) {
return angular.element('<textarea>').html(encodedHtml).text();
};
如何在HTML中实现它?
<div class="form-group" ng-class="{'disabled': confirmDeleteCheck}">
<label for="editReportNotes">Report Notes</label>
<div >
<textarea
name="editReportNotes"
class="edit-report-notes"
ng-readonly="!superuser"
ng-model="editProduct.product.reportNotes "
ng-click="forceCursorToTextEndOnClick( $event, !superuser || confirmDeleteCheck )">{{"editProduct.product.reportNotes" }}
</textarea>
<p class="subtext">Looking for Customer Notes?<br>Access on the Product/Survey detail page.</p>
<p ng-show="editableSurveyForm.editReportNotes.$error.required && submitted" class="error-message">Please enter report notes.</p>
</div>
</div>
{{"editProduct.product.reportNotes" }}
,以便对文本区域中的所有条目进行解码?