Search found 361 matches

by JoshyPHP
Wed Jan 02, 2013 2:59 am
Forum: [3.x][Archive] RFCs
Topic: [RFC|Accepted] Updated BBcode engine
Replies: 146
Views: 98040

Re: [RFC|Accepted] Updated BBcode engine

Multiple rendering backends. This is a subject I have barely scratched because I haven't seen a host that doesn't support ext/xsl and I was under the impression it was enabled by default, as opposed to being included by default. One possible alternative to using ext/xsl is to compile the template in...
by JoshyPHP
Wed Jan 02, 2013 12:31 am
Forum: [3.x][Archive] RFCs
Topic: [RFC|Accepted] Updated BBcode engine
Replies: 146
Views: 98040

Re: [RFC|Accepted] Updated BBcode engine

Thanks. I'm aiming at 100% coverage , minus a few codepaths that are unreachable under normal conditions. I haven't really checked the performance of any specific situation, even though I have a good idea of the parameters in play. The BBCode parser uses one big preg_match_all() to find where the BB...
by JoshyPHP
Tue Jan 01, 2013 10:48 pm
Forum: [3.x][Archive] RFCs
Topic: [RFC|Accepted] Updated BBcode engine
Replies: 146
Views: 98040

Re: [RFC|Accepted] Updated BBcode engine

I'm following up on my previous post. As I said, I've been working on a text formatting library, s9e\TextFormatter , for a little while now. Today, even though I still considering it some ways from being in a releasable state I have registered the project on Travis https://travis-ci.org/s9e/TextForm...
by JoshyPHP
Thu Dec 20, 2012 10:51 pm
Forum: [3.x][Archive] RFCs
Topic: [RFC|Accepted] Updated BBcode engine
Replies: 146
Views: 98040

Re: [RFC|Accepted] Updated BBcode engine

I see that this topic has been relatively active lately thanks to brunoais's efforts, so it would feel disingenuous if I waited more to say that I'm currently writing a text formatting library, which includes a BBCode plugin. And since my long-term goal is to see it included in forum softwares (with...
by JoshyPHP
Thu Dec 20, 2012 12:33 pm
Forum: [3.x][Archive] RFCs
Topic: [RFC|Accepted] Updated BBcode engine
Replies: 146
Views: 98040

Re: [RFC|Accepted] Updated BBcode engine

allow only some bbcodes inside of the quote-username About BBCodes inside the [quote] author, in my experience it's a feature that almost nobody uses. I don't have access to a large corpus, but in my own data I've only found 48 occurrences of those in ~255K posts (or ~0.02%), and all of them were a...
by JoshyPHP
Thu Dec 13, 2012 11:48 pm
Forum: [3.x][Archive] RFCs
Topic: [RFC|Accepted] Updated BBcode engine
Replies: 146
Views: 98040

Re: [RFC|Accepted] Updated BBcode engine

I don't disagree with displaying an error. Giving the user feedback seems like a good idea indeed, but the parser still has to be able to make out something of the garbled post to handle automated processes such as converting old posts from an older version or from another forum software. I've been ...
by JoshyPHP
Thu Dec 13, 2012 5:11 pm
Forum: [3.x][Archive] RFCs
Topic: [RFC|Accepted] Updated BBcode engine
Replies: 146
Views: 98040

Re: [RFC|Accepted] Updated BBcode engine

There are plenty of cases of bad user-submitted markup. Whenever reasonably possible and if the intent is obvious, I'll try to fix it. If the intent is not obvious to me, I'll defer to the HTML rules if they're simple enough to implement. Otherwise, I'd try to go with whatever makes sense and is sim...
by JoshyPHP
Wed Dec 12, 2012 11:01 pm
Forum: [3.x][Archive] RFCs
Topic: [RFC|Accepted] Updated BBcode engine
Replies: 146
Views: 98040

Re: [RFC|Accepted] Updated BBcode engine

Can't you render the parsed message as XHTML without parsing it as such? Frankly I'd rather not require the end users to balance their BBCode tags, especially when the current implementation doesn't. It seems like an unnecessary loss. I don't understand what you meant in your last sentence. If you u...
by JoshyPHP
Wed Dec 12, 2012 8:55 pm
Forum: [3.x][Archive] RFCs
Topic: [RFC|Accepted] Updated BBcode engine
Replies: 146
Views: 98040

Re: [RFC|Accepted] Updated BBcode engine

It doesn't have to be a hack at all. Optional end tags are part of HTML 5 and they're not limited to <li> so if you want to produce valid HTML you'd have to handle them appropriately. For instance, [p]a[p]b[/p]c[/p] might seem legal for a BBCode parser, but <p>a<p>b</p>c</p> is not valid HTML and it...
by JoshyPHP
Mon Dec 10, 2012 9:51 pm
Forum: [3.x][Archive] RFCs
Topic: [RFC|Accepted] Updated BBcode engine
Replies: 146
Views: 98040

Re: [RFC|Accepted] Updated BBcode engine

Ok, thanks. It would be nice if someone was able to compile a list of desirable characteristics, if not specs, for the current engine or future solution. It would be even better to sort them out as "essentials" (e.g. "needs to allow custom BBCodes" ), "nice-to-haves", and perhaps even features that ...