updated according to comment
This commit is contained in:
parent
bf4cef4870
commit
fbf5134b2e
1 changed files with 6 additions and 1 deletions
|
@ -137,7 +137,12 @@ angular.module('quay').factory('UtilService', ['$sanitize', 'markdownConverter',
|
||||||
utilService.UrlBuilder = UrlBuilder;
|
utilService.UrlBuilder = UrlBuilder;
|
||||||
|
|
||||||
utilService.removeHtmlTags = function(text){
|
utilService.removeHtmlTags = function(text){
|
||||||
|
try {
|
||||||
return new DOMParser().parseFromString(text, 'text/html').body.textContent || text;
|
return new DOMParser().parseFromString(text, 'text/html').body.textContent || text;
|
||||||
|
} catch(e) {
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return utilService;
|
return utilService;
|
||||||
|
|
Reference in a new issue