ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: Jorin on February 25, 2015, 02:58:55 am

Title: 1.0.2: Quote with link to website - no second quote possible?
Post by: Jorin on February 25, 2015, 02:58:55 am
When I quote like this:

 [quote=http://hybrid-piloten.de]This is the quote.[/quote]

...I can't make a second quote in the same post.  :o
Title: Re: 1.0.2: Quote with link to website - no second quote possible?
Post by: Jorin on February 25, 2015, 02:59:48 am
Test!

Quote from: http://hybrid-piloten.deThis is the quote.

Test!

Quote from: http://hybrid-piloten.deThis is the quote.
Title: Re: 1.0.2: Quote with link to website - no second quote possible?
Post by: Jorin on February 25, 2015, 03:00:27 am
Modify my answer #1 to see the correct bbc. Same error here.
Title: Re: 1.0.2: Quote with link to website - no second quote possible?
Post by: emanuele on February 25, 2015, 04:10:28 am
Quote from: Jorin – Test!

Quote from: http://hybrid-piloten.deThis is the quote.

Test!

Quote from: http://hybrid-piloten.deThis is the quote.
Title: Re: 1.0.2: Quote with link to website - no second quote possible?
Post by: emanuele on February 25, 2015, 04:12:25 am
Since we are talking about quotes, some more details are necessary. ;)
Title: Re: 1.0.2: Quote with link to website - no second quote possible?
Post by: Jorin on February 25, 2015, 04:19:50 am
Full post page. Non-WYSIWYG editor.
Title: Re: 1.0.2: Quote with link to website - no second quote possible?
Post by: emanuele on February 25, 2015, 05:35:14 am
Okay... I'm slow this morning, now I got what the problem is... :-[
Title: Re: 1.0.2: Quote with link to website - no second quote possible?
Post by: Jorin on March 02, 2015, 07:58:38 am
It's not a bug, it's a feature?  ;)
Title: Re: 1.0.2: Quote with link to website - no second quote possible?
Post by: emanuele on March 02, 2015, 08:24:59 am
Quote from: http://hybrid-piloten.deThis is the quote.

Quote from: Jorin – It's not a bug, it's a feature?  ;)
Title: Re: 1.0.2: Quote with link to website - no second quote possible?
Post by: emanuele on March 02, 2015, 08:26:28 am
Oddity... the above doesn't work in preview, but works "somehow" (the url in the first quote is not linked) in a real post.

@Spuds any idea? O:-)

Quote from: http://hybrid-piloten.deThis is the quote.

Quote from: Jorin – It's not a bug, it's a feature?  ;)
Title: Re: 1.0.2: Quote with link to website - no second quote possible?
Post by: Jorin on March 02, 2015, 08:58:58 am
The whole thing acts weird.  :o  Try switching between WYSIWYG- and non-WYSIWYG editor. Try to save a post, edit it again, change the bbc (it is now [quote author=http...] instead of [quote=http...] as it was before editing the post). You can get a second quote bbc if the url in the first quote doesn't work with a link to the page. It acts strange and not traceable at first sight.
Title: Re: 1.0.2: Quote with link to website - no second quote possible?
Post by: emanuele on March 02, 2015, 09:55:13 am
hmm... at least a pattern is kind of emerging.
Well, we are already late with 1.0.3, we may fix that one as well if it doesn't involve too many oddities...
Title: Re: 1.0.2: Quote with link to website - no second quote possible?
Post by: Spuds on March 02, 2015, 02:42:26 pm
Its something to do with the recursive call and the disabled cache values.

In parse, when it working on parsed_equals content quotes, it hits the area that starts with
Quote// For parsed content, we must recurse to avoid security problems.
which will call parse_bbc to only parse the
Quote'parsed_tags_allowed' => array('url', 'iurl', 'ftp'),
tags that may be used in an author name.  So thats all cool ...

But that static $disabled gets updated to disable all other tags except those that were in the parsed_tags_allowed, and since its static all points after that seem to be a problem.  You can prove this by commenting out the static $disabled but I think the issue is in the
Quote// If we are not doing every enabled tag then create a cache for this parsing group.
section.  Could use some more eyes on that.

ETA: I'm thinking that static is useless since we have that mini cache, maybe that should be static $parse_tag_cache = array(); instead?
Title: Re: 1.0.2: Quote with link to website - no second quote possible?
Post by: emanuele on March 02, 2015, 04:42:41 pm
Okay, give me a couple of years to try to understand again parse_bbc. LOL
I'll try to have a look at it tomorrow (or the day after).
Title: Re: 1.0.2: Quote with link to website - no second quote possible?
Post by: Spuds on March 02, 2015, 07:29:55 pm
LOL ... no one will ever understand parse_bbc, its an enigma and must remain so :P

I think the fix is to change static $disabled to static $parse_tag_cache but another set of eyes on is a good thing!
Title: Re: 1.0.2: Quote with link to website - no second quote possible?
Post by: emanuele on March 03, 2015, 03:01:11 am
Quote from: Spuds – LOL ... no one will ever understand parse_bbc, its an enigma and must remain so :P
ROFL!
Title: Re: 1.0.2: Quote with link to website - no second quote possible?
Post by: emanuele on March 10, 2015, 10:39:20 am
Now it appears to work fine! :D
Title: Re: 1.0.2: Quote with link to website - no second quote possible?
Post by: Spuds on March 10, 2015, 05:09:35 pm
We must be running 1.03 :D
Title: Re: 1.0.2: Quote with link to website - no second quote possible?
Post by: emanuele on March 10, 2015, 05:13:40 pm
I did an update today. O:-)