Vue js method to remove html tags +  

Viewed 33

I have this vue method:

        removeHtmlTags: function (paragraph) {
            let regex = /(<([^>]+)>)/ig;
            return paragraph.replace(regex, "");
        },

It works well in removing html tags, but there I always keep getting this " " in my code(which I would also like to remove).

Any idea on how to remove   with the regex while still removing all the other html tags?

Thanks

0 Answers
Related