spring-website icon indicating copy to clipboard operation
spring-website copied to clipboard

Force balance tags in news

Open tomjn opened this issue 3 years ago • 3 comments

Fixes an issue that causes nested news items when BBCode isn't parsed properly and HTML tags are opened but not closed.

The force_balance_tags function is derived from WordPress which itself uses a fork. The alternative is a DOMDocument, but this avoids encoding issues and has been battle hardened by running on hundreds of millions of sites for 19 years

tomjn avatar May 30 '22 21:05 tomjn

shouldn't the bbcode parser be fixed?

abma avatar Jun 02 '22 09:06 abma

yes but I’m not familiar with the BBCode parser and it’s a nice separation of concerns so I’d still add the function anyway

On Thu, 2 Jun 2022 at 10:06, abma @.***> wrote:

shouldn't the bbcode parser be fixed?

— Reply to this email directly, view it on GitHub https://github.com/spring/spring-website/pull/82#issuecomment-1144628390, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAOLZ66QSD7HP63XMCLD7DVNB2RZANCNFSM5XLT2UFQ . You are receiving this because you authored the thread.Message ID: @.***>

tomjn avatar Jun 02 '22 12:06 tomjn

ok. i guess i'll try

https://github.com/genert/bbcode or https://github.com/jbowens/jBBCode

then: this project didn't exist the last time i searched for a bbcode parser.

abma avatar Jun 02 '22 14:06 abma