how to replace \n to <br > in telegram instant view
问题 I am trying to setup a Telegram Instant View for a website. i have a text with a lot of break-lines \n and no <br> so i need a solution to replace every \n to <br> 回答1: Try @replace function: @replace("\\n", "<br>"): $body//p 回答2: There is no way (in the Instant View DSL) to replace a part of a text node with an HTML tag (i.e. element node). Any HTML you insert as text will be escaped. 回答3: As I remember, if you debug $paragraph/text() , there will be a lot of text nodes, that are separated