diff --git a/js/prototype/prototype.js b/js/prototype/prototype.js index caddfc8e343..9ab67b6c961 100644 --- a/js/prototype/prototype.js +++ b/js/prototype/prototype.js @@ -621,7 +621,13 @@ Object.extend(String.prototype, (function() { } function stripTags() { - return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>'"])+)?\s*("[^">]*|'[^'>])?(\/)?>|<\/\w+>/gi, ''); + var previous; + var input = this; + do { + previous = input; + input = input.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>'"])+)?\s*("[^">]*|'[^'>])?(\/)?>|<\/\w+>/gi, ''); + } while (input !== previous); + return input; } function stripScripts() { @@ -7592,4 +7598,4 @@ Object.extend(Element.ClassNames.prototype, Enumerable); return Prototype.Selector.select(selector, element || document); } }); -})(); \ No newline at end of file +})();