samclarke / SBBCodeParser

BBCode Parser Class
http://www.samclarke.com/
24 stars 15 forks source link

[youtube] block or inline? #3

Open alex-georgiou opened 11 years ago

alex-georgiou commented 11 years ago

I had a situation where a user had entered into SCEditor a youtube video inside some other formatting tags ([b],[i]) and the rendering to HTML was throwing an exception. Digging around I found out that in classes/Node/Container/Document.php the [youtube] tag is defined as block. I changed the constructor's third parameter to BBCode::INLINE_TAG and it solved my immediate problem.

Does youtube really need to be block-level? I'm asking because if this is the case, then the WYSIWYG part of SCEditor should also make sure to produce correct bbcode that can be parsed by SBBCodeParser.

Thanks

Khalilbz commented 8 years ago

Me too I don't see that it should be a block-level so I changed all the block level tags to INLINE_TAG specially the URL Tag :) :) :+1: