Ticket #798 (closed Defect: fixed)

Opened 7 months ago

Last modified 1 month ago

BBCode inside PRE tags is being parsed

Reported by: jbk Assigned to: 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

12/15/08 12:31:33 changed 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.

06/03/09 14:07:30 changed by davea

  • status changed from new to closed.
  • resolution set to worksforme.

I don't understand the problem

06/03/09 14:12:03 changed by Nicolas

  • status changed from closed to reopened.
  • resolution deleted.

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

06/03/09 16:00:45 changed by davea

  • status changed from reopened to closed.
  • resolution set to fixed.

(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.


If this page is incomplete or incorrect, please edit it or add it to the wiki to-do list. To do this, you must be logged in; click Login or Register above.