Deprecate [*] and use [li][/li] instead

These RFCs were either rejected or have been replaced by an alternative proposal. They will not be included in phpBB.
User avatar
Pony99CA
Registered User
Posts: 986
Joined: Sun Feb 08, 2009 2:35 am
Location: Hollister, CA
Contact:

Re: [RFC] Deprecate [*] and use [li][/li] instead

Post by Pony99CA » Wed Dec 12, 2012 3:25 am

nickvergessen wrote:Speaking of XML-like parsing. One idea of the new parser was to allow things like

Code: Select all

[b]bold [color=#008000]bold+color[/b] color[/color]
(just want to ensure that you got that?)
Why should improper nesting of tags work? I would oppose that. Here's how it renders currently:

bold bold+color color

Is that how it should work? Probably not, but garbage in, garbage out. It should either generate an error (people wouldn't be allowed to post with bad markup :!: :D) or something with some of the BBCode tags visible.
Oleg wrote:Replacing * with li and requiring a closing [/li] seems very annoying.

You still have to support [*], therefore I'm assuming the performance difference being discussed applies only when [*] is used? How big is this difference exactly? I'm sure it's not enough to matter.

Please leave [*] alone.
While I agree that we should be backward compatible, how many sites had to change paragraph mark-up (among other things) from:

Here's a paragraph.<p>Here's another.<p>

to

<p>Here's a paragraph.</p><p>Here's another.</p>

to be XHTML-compliant?

Of course, board users aren't HTML writers, so they probably wouldn't understand why such a seemingly capricious change was made.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC] Deprecate [*] and use [li][/li] instead

Post by Oleg » Wed Dec 12, 2012 6:31 am

The issues that html had with well-formedness do not apply to bbcode. People are not confused what [*] attaches to.

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: [RFC] Deprecate [*] and use [li][/li] instead

Post by nickvergessen » Wed Dec 12, 2012 8:02 am

Pony99CA wrote:
nickvergessen wrote:Speaking of XML-like parsing. One idea of the new parser was to allow things like

Code: Select all

[b]bold [color=#008000]bold+color[/b] color[/color]
(just want to ensure that you got that?)
Why should improper nesting of tags work? I would oppose that. Here's how it renders currently:

bold bold+color color

Is that how it should work? Probably not, but garbage in, garbage out. It should either generate an error (people wouldn't be allowed to post with bad markup :!: :D) or something with some of the BBCode tags visible.
That is just what I'm trying to tell you, that this should not be improper when the new parser is done. We do not want to support nesting only, but again it could be tricked, to just output the following after the parsing and reverting it while editing a post:

Code: Select all

[b]bold [color=#008000]bold+color[/color][/b][color=#008000] color[/color]
bold bold+color color
But if the parsing is not XML like, that should even be easier
Member of the Development-TeamNo Support via PM

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] Deprecate [*] and use [li][/li] instead

Post by brunoais » Wed Dec 12, 2012 9:05 am

If you say so...
I'll do as much as i can to allow it to be as efficient as possible but this will be a performance hit (I just don't know how much).

User avatar
Jessica.
Registered User
Posts: 144
Joined: Wed Feb 09, 2011 8:17 pm
Location: Pennsylvania, USA
Contact:

Re: Deprecate [*] and use [li][/li] instead

Post by Jessica. » Wed Dec 12, 2012 2:54 pm

No.

-1

I like just having to use [*] without using an end tag. It's SO much easier. With SMF, it's the li tags and I don't like it and I don't want phpBB to change it to that...

User avatar
Pony99CA
Registered User
Posts: 986
Joined: Sun Feb 08, 2009 2:35 am
Location: Hollister, CA
Contact:

Re: [RFC] Deprecate [*] and use [li][/li] instead

Post by Pony99CA » Wed Dec 12, 2012 9:38 pm

nickvergessen wrote:
Pony99CA wrote:
nickvergessen wrote:Speaking of XML-like parsing. One idea of the new parser was to allow things like

Code: Select all

[b]bold [color=#008000]bold+color[/b] color[/color]
(just want to ensure that you got that?)
Why should improper nesting of tags work? I would oppose that. Here's how it renders currently:

bold bold+color color

Is that how it should work? Probably not, but garbage in, garbage out. It should either generate an error (people wouldn't be allowed to post with bad markup :!: :D) or something with some of the BBCode tags visible.
That is just what I'm trying to tell you, that this should not be improper when the new parser is done.
I know what you're trying to tell me (although I'm not sure how it's relevant to this topic; it should probably be in the main BBCode parser topic); I simply disagree with you. That nesting wouldn't be valid in HTML, would it? If not, I don't mind if we don't support it in the new parser.
nickvergessen wrote:We do not want to support nesting only, but again it could be tricked, to just output the following after the parsing and reverting it while editing a post:

Code: Select all

[b]bold [color=#008000]bold+color[/color][/b][color=#008000] color[/color]
bold bold+color color
But if the parsing is not XML like, that should even be easier
If the user wants that "reverted" BBCode, he should write it that way in the first place. It's not rocket science and with copy/paste it doesn't take that much effort to make it properly nested.

To get back on track with the bullet topic, we have to support [*] and close the the <li> element when another another (non-nested) [*] or [/list] is found. If the new parser wants to replace [*] with [li] and [/li] elements, I don't have a problem with that, but then it will have to support things like:

Code: Select all

[list]
[li]First list item[/li]
[*]Second list item that was inserted
[li]Original second list item[/li]
[/list]
However, unless you can show me a case where improperly nested BBCode tags gave "good" (expected) output in the current parser, we should not have to support improperly nested tags. As mentioned, I would rather throw an error on the posting page saying something like "BBCode syntax error -- [whatever] tag not closed" in a manner similar to what happens if an image is too big to display. That should actually make things better -- people will have to work much harder to post unterminated tags or mangled quotes. :D

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] Deprecate [*] and use [li][/li] instead

Post by brunoais » Wed Dec 12, 2012 10:09 pm

Pony99CA wrote: As mentioned, I would rather throw an error on the posting page saying something like "BBCode syntax error -- [whatever] tag not closed" in a manner similar to what happens if an image is too big to display. That should actually make things better -- people will have to work much harder to post unterminated tags or mangled quotes. :D
Programmers are used to those kinds of outputs. The "average" user isn't.
With the WYSIWYG editor, it will take care of showing on the fly when it is wrong and also allow the user to change and see, at the same time, the outcome of that change.
Without that, showing a parse error does not seem a good idea.
IMO, It should just swallow the errors and not parse what's wrong.

Anyway, for now the idea is to use:
[*] and [/*] as the opening and closing tags for list items.
About not supporting not closing [*] is still open for discussion even though it is not in good shape...
The idea about using [li], I think, is rejected.

User avatar
Pony99CA
Registered User
Posts: 986
Joined: Sun Feb 08, 2009 2:35 am
Location: Hollister, CA
Contact:

Re: [RFC] Deprecate [*] and use [li][/li] instead

Post by Pony99CA » Thu Dec 13, 2012 12:09 am

brunoais wrote:
Pony99CA wrote: As mentioned, I would rather throw an error on the posting page saying something like "BBCode syntax error -- [whatever] tag not closed" in a manner similar to what happens if an image is too big to display. That should actually make things better -- people will have to work much harder to post unterminated tags or mangled quotes. :D
Programmers are used to those kinds of outputs. The "average" user isn't.
People are used to error messages -- making the error message understandable is the trick. However, a somewhat difficult to understand message is better than confusing output without any clue about what went wrong.
brunoais wrote:With the WYSIWYG editor, it will take care of showing on the fly when it is wrong and also allow the user to change and see, at the same time, the outcome of that change.
I suppose that depends on how good the editor is. For now, I'm still presuming that we don't have one (it's not on Area 51, so it doesn't count yet :)).

But, presuming the editor is "good" (I can highlight text, then click a BBCode button and have that BBCode wrapped around the highlighted text, what happens when the user highlights something incorrectly that causes BBCode to span partial elements?
brunoais wrote:Without that, showing a parse error does not seem a good idea.
IMO, It should just swallow the errors and not parse what's wrong.
I think that's worse. Then people will wonder where their output went (if it vanishes) or why the BBCode doesn't look like they expected. An error message at least gives some indication of what happened.

Anyway, I think this is drifting away from the RFC topic. Maybe somebody can copy this discussion to the main BBCode parser topic.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: Deprecate [*] and use [li][/li] instead

Post by Oleg » Thu Dec 13, 2012 12:11 am

This now does not make any sense. Unclosed [*] is still supported for compatibility, what is the point of adding a closing [/*]?

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: [RFC] Deprecate [*] and use [li][/li] instead

Post by nickvergessen » Thu Dec 13, 2012 8:44 am

Pony99CA wrote:I suppose that depends on how good the editor is. For now, I'm still presuming that we don't have one (it's not on Area 51, so it doesn't count yet :)).
Just that this was mostly THE one argument for getting a new parser. The parser is a Blocker for the Editor and now you say we dont have an editor, so we ignore it? :P
Oleg wrote:This now does not make any sense. Unclosed [*] is still supported for compatibility, what is the point of adding a closing [/*]?
And because of this im marking this as rejected.
Member of the Development-TeamNo Support via PM

Post Reply