Opened 16 years ago

Closed 15 years ago

#798 closed Defect (fixed)

BBCode inside PRE tags is being parsed

Reported by: jbk Owned by: davea
Priority: Trivial Milestone: Undetermined
Component: Web - Forums Version: 6.2.19
Keywords: bbcode Cc:

Description

Fixed the same issue for CODE tags but didn't fix it for PRE tags.

The reason is that CODE blocks use divs with stylesheets allowing us to use escaping of [ to break out of the BBCode parsing recursion. Pre tags are implemented directly as HTML pre tags and hence do not allow escaping (the escape code would show up instead of the actual char).

The solution is of course to make PRE blocks do the same thing as CODE blocks do now: 1) Add a style for pre divs and convince all projects to update their CSS 2) Make 'pre's do what 'code's do now in text_transform.php - with the exception that they use the 'pre' CSS class instead of 'code'

Change History (4)

comment:1 Changed 16 years ago by Nicolas

What kind of escaping are you talking about? <pre>&amp;</pre> works just fine; escape codes are replaced by the parser, without caring what tag they are in.

comment:2 Changed 15 years ago by davea

Resolution: worksforme
Status: newclosed

I don't understand the problem

comment:3 Changed 15 years ago by Nicolas

Resolution: worksforme
Status: closedreopened

[pre]hello [b]world[/b][/pre] shows bold instead of a literal [b].

comment:4 Changed 15 years ago by davea

Resolution: fixed
Status: reopenedclosed

(In [18285]) - web: make [pre] work similar to [code]. fixes #798

Note: I had to move [pre] to the top of the preg list to make this work. Not sure why.

Note: See TracTickets for help on using tickets.