Opened 15 years ago

Closed 15 years ago

#891 closed Defect (fixed)

bbcode translation: br tags are being added inside pre containers

Reported by: MichaelRoberts Owned by: davea
Priority: Undetermined Milestone: Undetermined
Component: Web - Forums Version: 6.6.20
Keywords: Cc:

Description

In http://setiathome.berkeley.edu/forum_thread.php?id=53649&nowrap=true#895413 , Steven Meyer has reminded us that the bbcode pre tags generate extra blank lines inbetween each real line. His comments helped me to track down where this is happening and the attached patch should fix it.

The new code is analogous to the handling of stop_recursion, so I don't expect any problems integrating it -- but note I have not actually tested it (no PHP test environment yet...)

Attachments (1)

bbcode.diff (1.3 KB) - added by MichaelRoberts 15 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 15 years ago by davea

The patch doesn't work

comment:2 Changed 15 years ago by MichaelRoberts

Damn. So much for coding by analogy. I will have to sort out a testing environment before I can do any more with that. Sorry.

Changed 15 years ago by MichaelRoberts

Attachment: bbcode.diff added

comment:3 Changed 15 years ago by MichaelRoberts

I had not noticed the @eis which makes the regex executed. I have replaced the patch and tested this with a simple php page including the modified file and it works nicely.

(For the test, I commented out the inclusion of sanitize_html.inc . Since the call to sanitize_html is commented out, you can I think comment out the inclusion too.)

comment:4 Changed 15 years ago by davea

Resolution: fixed
Status: newclosed

(In [18140]) - web: fix formatting in [pre]. Fixes #891

Note: See TracTickets for help on using tickets.