[RFC|Accepted] Updated BBcode engine

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
Post Reply
User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: [RFC|Accepted] Updated BBcode engine

Post by nickvergessen »

It would be very useful for lot of MODs to have a trim/substr-function which does not break the layout because some bbcodes are not closed correctly.
Member of the Development-TeamNo Support via PM

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

Re: [RFC|Accepted] Updated BBcode engine

Post by Oleg »

I rebased on current develop which surprisingly worked:

https://github.com/p/phpbb3/compare/dev ... e%2Fbbcode

Commit messages need to be fixed.
naderman wrote: It seems you have not backported any of the tests. It's important that our new BBCode parser be well tested, so please add unit tests.
Where are these tests? Link to commits maybe even?

If anyone has any relevant code please commit and/or publicize it.

User avatar
rxu Online
Registered User
Posts: 164
Joined: Tue Apr 04, 2006 4:28 pm
Contact:

Re: [RFC|Accepted] Updated BBcode engine

Post by rxu »

The patch doesn't respect fix for XSS in flash bbcode as well as classes autoloading feature, it should be fixed.
Didn't look deeper yet.
Image

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

Re: [RFC|Accepted] Updated BBcode engine

Post by Oleg »

(22:33:22) nn-: naderman: do you know what the status of bbcode engine is?
(22:33:32) nn-: i.e. how complete/functional that diff is
(22:34:11) naderman: well it does work
(22:34:18) naderman: it's just not really integrated with any of our code
(22:35:14) nn-: what does that mean?
(22:36:14) naderman: well it is a working bbcode engine
(22:36:23) naderman: but the patch does not include any changes to code to actually use it
(22:36:39) naderman: so posting/signature etc. all need to be changed to actually use it still
(22:36:48) naderman: that's the last status I knew anyway
(22:37:06) naderman: + there were a bunch of things not done the way that I'd like them to be done
(22:37:13) naderman: so I'd probably want to make further changes to it

User avatar
hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 968
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: [RFC|Accepted] Updated BBcode engine

Post by hanakin »

Not sure if the new parser will fix this issue but thought it worth mentioning inhere, there needs to be a way to contain a bbcode of the same type with in a bbcode exp: would be if we set a block of text as black but wanted to emphasize a keyword with in that text with red the first color tag would take precedence over the closing tag for the red and it would jack up everything below that. Not sure of the fix for this but is something that really annoys me about the engine
Donations welcome via Paypal Image

User avatar
tbackoff
Registered User
Posts: 180
Joined: Sat Jun 12, 2010 3:25 am

Re: [RFC|Accepted] Updated BBcode engine

Post by tbackoff »

hanakin,

See my post here.

User avatar
javiexin
Registered User
Posts: 90
Joined: Thu Dec 22, 2011 10:04 am

Re: [RFC|Accepted] Updated BBcode engine

Post by javiexin »

Hello,

A somehow related issue that might be covered in this RFC as well is the treatment of "local" vs "external" URLs.

In the current system, all URLs are stored complete, with protocol and domain. However, in the event of a migration to a different domain, or creation of a copy (for example for testing purposes, or to have a local copy), all internal references within the posts are broken, as they still point to the old domain.

There are two ways to solve this, as far as I can tell:
  1. running a (set of) SQL commands upon migration, to change the old domain to the new domain; this is risky, error-prone and more importantly, it might change things that are not meant to be changed
  2. having the phpbb system to automatically detect these local URLs and have them stored as relative URLs in the posting text; this would automatically solve the issue
Implementing this change should not be too complicated, as the local URLs are already being identified as such (with magic URLs, if local they are assigned the "postlink-local" class), but this should also be done for URL and URL= BBCodes, as well as for custom BBCodes.

Would you think that this should be part of this RFC, or at least, would it be easier to implement such change in this new BBCode engine system?

Thanks in advance,
-javiexin

PS: For reference, this is coming from here: http://www.phpbb.com/community/viewtopi ... &t=2146480

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

Re: [RFC|Accepted] Updated BBcode engine

Post by brunoais »

^Agree. Still I'd prefer an even 3rd proposal.
Save local urls as partial urls.
Example: An url to this thread:

Code: Select all

http://area51.phpbb.com/phpBB/viewtopic.php?f=84&t=33021
Should be saved as:

Code: Select all

viewtopic.php?f=84&t=33021
this way, it is always according to where the topic is.
So, if I use:

Code: Select all

viewforum.php?f=90
It will always point to the forum 90 in the current website.
if this forum had moved to:

Code: Select all

http://area51.phpbb.com/phpBB3_1/viewforum.php?f=90
It would still work.

User avatar
javiexin
Registered User
Posts: 90
Joined: Thu Dec 22, 2011 10:04 am

Re: [RFC|Accepted] Updated BBcode engine

Post by javiexin »

brunoais wrote: Still I'd prefer an even 3rd proposal.
Save local urls as partial urls.
Yes, precisely what I meant:
javiexin wrote:having the phpbb system to automatically detect these local URLs and have them stored as relative URLs in the posting text; this would automatically solve the issue
So, how does this process progress then?
-javiexin

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

Re: [RFC|Accepted] Updated BBcode engine

Post by brunoais »

javiexin wrote:
brunoais wrote: Still I'd prefer an even 3rd proposal.
Save local urls as partial urls.
Yes, precisely what I meant:
javiexin wrote:having the phpbb system to automatically detect these local URLs and have them stored as relative URLs in the posting text; this would automatically solve the issue
Ups, sorry 'bout that. Lack of attention

Post Reply