BBC Question regarding <br />

Started by kat★, September 22, 2016, 07:06:07 PM

Previous topic - Next topic

kat★

I've been making my BBC code and am wondering how to do the following:
I have a spoiler that spans the whole line, just like a quote would, and then opens down when clicked on, however, when I type it in the post window, the following occurs:
After a [/quote] tag, it doesn't matter if you continue writing on or if you hit enter, since it will automatically start in the next line
However after my [/spoiler] tag, if i continue writing normally, the text appears normal, yet if i hit enter, there will be one <br /> tag too much.

How do I make the spoiler tag to behave like the quote tag does, by ignoring the <br /> if the user hits enter or if he doesnt?
Thank you for help.
I use smf to learn to write php and css. It's pretty neat. |

Advertisement: