Forum Syntax: Parentheses in Spoiler Code Blocks are Escaped

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Forum Syntax: Parentheses in Spoiler Code Blocks are Escaped

Re: Forum Syntax: Parentheses in Spoiler Code Blocks are Esc

Post by BGM » 31 Dec 2013, 14:53

Hi all. The issue is solved.

Thanks Tank!

Re: Forum Syntax: Parentheses in Spoiler Code Blocks are Esc

Post by tank » 27 Dec 2013, 22:33

for the record this correction workedfrom

Code: Select all

			// Some characters was encoded before. We have to decode it
			$str_from = array('<', '>', '&#91;', '&#93;', '&#46;', '&#58;', '&#058;', ''', ''', '"', '&');
			$str_to = array('<', '>', '[', ']', '.', ':', ':', "'", "'", '"', '&');
to

Code: Select all

			// Some characters was encoded before. We have to decode it
			$str_from = array('<', '>', '&#91;', '&#93;', '&#46;', '&#58;', '&#40;', '&#41;', '&#058;', ''', ''', '"', '&');
			$str_to = array('<', '>', '[', ']', '.', ':', '(', ")", ':', "'", "'", '"', '&');

Re: Forum Syntax: Parentheses in Spoiler Code Blocks are Esc

Post by Alibaba » 27 Dec 2013, 12:27

So it's caused by the syntax highlighting?

Re: Forum Syntax: Parentheses in Spoiler Code Blocks are Esc

Post by HotKeyIt » 26 Dec 2013, 18:20

The error only appears when [ code=...] is used,
Spoiler
[ code] alone works fine.
Spoiler

Re: Forum Syntax: Parentheses in Spoiler Code Blocks are Esc

Post by Alibaba » 26 Dec 2013, 16:38

Why does the spoiler get in conflict with the codebox?

I hope it's not my fault. ;)
When i added the spoiler tag i used a normal div element and javascript to toggle its visibility attribute. I wonder how does this get in conflict with the code box?
Is there another way to create spoilers?

Re: Forum Syntax: Parentheses in Spoiler Code Blocks are Esc

Post by trismarck » 26 Dec 2013, 07:07

Yeah, I need this too for interactive purposes (; . Please fix this tank, if possible.

Re: Forum Syntax: Parentheses in Spoiler Code Blocks are Esc

Post by BGM » 23 Nov 2013, 22:32

Great! Tank, I'm glad you started this forum, and I know others are too. It is quite disappointing to see what has happened to the original. It seems like so much has been lost, but hopefully someday things will turn around.

God bless you.

Re: Forum Syntax: Parentheses in Spoiler Code Blocks are Esc

Post by tank » 23 Nov 2013, 21:30

but the code boxes are collapsed to 13 lines by default.

your fine i can take comments/advice and criticism all in the same ear and not feel one way or another. this forum exits because members like you need things that couldn't be provided elsewhere. I appreciate candor far more than silence.

I may lack the kind of time i would like but i do intend to fulfill this item

Re: Forum Syntax: Parentheses in Spoiler Code Blocks are Esc

Post by BGM » 23 Nov 2013, 20:44

Thanks for answering, Tank. I hope I didn't come across as too forward...

Actually, I just started using them. I like them because alot of times you want the gist of the thread and don't want to scroll through some 50 lines of code. The spoiler lets you hide the not-integral parts of the sense and makes it easier to read the entire thread.

No worries from me though. Now that I've mentioned it, I am quite content to live with whatever happens (or not) ;) .
If you disabled the spoilers on account of the skewed display (causes confusion), I, for one would not complain.

Re: Forum Syntax: Parentheses in Spoiler Code Blocks are Esc

Post by tank » 23 Nov 2013, 20:32

yea its been reported but text encoding is done for security purposes and the spoilers and code boxes are in conflict. this isnt an easy fix as spoilers werent designed for phpbb3. I am unsure why they are so desirable. .I am also unsure why the fascination with nesting code boxes inside spoilers. That really isnt important clearly the community wants them. I am open to somone providing some code otherwise it is likely to be over holiday vacations that i try this difficult task

Also i am moving this to the bug reports as opposed to wish list

Forum Syntax: Parentheses in Spoiler Code Blocks are Escaped

Post by BGM » 23 Nov 2013, 20:15

Supposedly this is a known issue, but I don't see a post, so I am making one!

When you create a code block and wrap it in a spoiler, it seems that parenthesis get converted into their html code equivalent.
This is havoc when you copy and paste code or download the code as a script!

Look:
This line should look like this:
Here is a Left Parenthesis ( and here is a Right Parenthesis )

Code Block only:

Code: Select all

 Here is a Left Parenthesis ( and here is a Right Parenthesis )
Spoiler only:
Spoiler
The issue is when you put a code block in a spoiler.
Spoiler
Can this get fixed, please before we have a slew of code-blocks to clean up? (Thank you!)

Top