简体   繁体   中英

I want to remove “ ” from my html in typescript

Here is what I am getting as a string. I need to put this inside a <p> but not able to find any solution

An investment strategy that's sosimple&#160;and so&#160;effective, we call it the "magic portfolio." It's a way to&#160;guarantee&#160;that you will beat the market.

I was using

return text.replace(/(<[^>]+>)/g, "");

尝试使用 text.replcae(your reg expression).replace(your reg expression)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM