Forum Syntax: Parentheses in Spoiler Code Blocks are Escaped

Discuss issues and requests related with the forum software
User avatar
BGM
Posts: 507
Joined: 20 Nov 2013, 20:56
Contact:

Forum Syntax: Parentheses in Spoiler Code Blocks are Escaped

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!)
User avatar
tank
Posts: 3122
Joined: 28 Sep 2013, 22:15
Location: CarrolltonTX
Contact:

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

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
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter
User avatar
BGM
Posts: 507
Joined: 20 Nov 2013, 20:56
Contact:

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

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.
User avatar
tank
Posts: 3122
Joined: 28 Sep 2013, 22:15
Location: CarrolltonTX
Contact:

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

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
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter
User avatar
BGM
Posts: 507
Joined: 20 Nov 2013, 20:56
Contact:

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

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.
User avatar
trismarck
Posts: 506
Joined: 30 Sep 2013, 01:48
Location: Poland

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

26 Dec 2013, 07:07

Yeah, I need this too for interactive purposes (; . Please fix this tank, if possible.
Alibaba
Posts: 480
Joined: 29 Sep 2013, 16:15
Location: Germany

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

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?
"Nothing is quieter than a loaded gun." - Heinrich Heine
HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

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

26 Dec 2013, 18:20

The error only appears when [ code=...] is used,
Spoiler
[ code] alone works fine.
Spoiler
Alibaba
Posts: 480
Joined: 29 Sep 2013, 16:15
Location: Germany

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

27 Dec 2013, 12:27

So it's caused by the syntax highlighting?
"Nothing is quieter than a loaded gun." - Heinrich Heine
User avatar
tank
Posts: 3122
Joined: 28 Sep 2013, 22:15
Location: CarrolltonTX
Contact:

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

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('<', '>', '[', ']', '.', ':', '(', ")", ':', "'", "'", '"', '&');
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter

Return to “Forum Issues”

Who is online

Users browsing this forum: No registered users and 42 guests