panzerdp/voca

Strip HTML from Text

nhaberl opened this issue ยท 6 comments

Awesome library, would have a suggestion.
v.stripHtml(htmlTagArray = [''])

If any htmlTag is given within the array the strip function is limited to them otherwise the function removes all html tags.

Hello @nhaberl,

Agreed, this is an important function to have. I will probably name it stripTags.
It may have the following signature:

v.stripTags(string, [allowedTags = [ ] ])

@panzerdp I would like to work on this issue, if you don't mind. Should probably be done in couple days ๐Ÿ˜„

@IvanJov Thanks! However I already started the function implementation.

@panzerdp Sure, no problem. If you have ideas for some other function, I would love to help, just let me know!

The function v.stripTags() is implemented in the new version 1.1.0.
See the docs: https://vocajs.com/#stripTags.

Great job @panzerdp !