I am having JavaScript string combinations like this,
str = "<div>xyz 123 <rd> </div>"
or
str = "sample text <abc>"
or
str = "Text <input type="text" /> new value <bla> ."
I have to find invalid tags(not having end tags) like (<rd>, <abc>, <bla>)
and need to replace like <bla>
Can someone help to solve this. Fully in JavaScript.