Instance Titles improperly escaped
lyricnz - January 15, 2009 - 14:08
| Project: | MultiBlock |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | NancyDru |
| Status: | closed |
Jump to:
Description
Create an instance called "Who's Online 1", and this looks fine in the Instance page (Picture 3 attachment). However, on the block-list page, this appears as per Picture 4 attachment - with htmlencoding. Obviously, you can create a custom block on the normal block page, with the same format title, and it works fine (Picture 5 attachment).
| Attachment | Size |
|---|---|
| Picture 3.JPG | 28.67 KB |
| Picture 4.JPG | 28.07 KB |

#1
Try changing line 38 from
$list[$block->delta] = array('info' => check_plain($block->title));to
$list[$block->delta] = array('info' => $block->title);Block modules should have already escaped the titles before we get them back, and then we were escaping them again. Indeed if you look at "Who's Online" you will actually find ' in place if the quote.
I still need to look and see if we still need to escape the title when we create a new instance.
#2
@Andrew: We don't need check_plain as the block.module is doing that at display time.
#3
Committed on both branches.
#4
Nancy, thanks so much for keeping up with all these issues better than I can!
#5
No problem. Where should I send the invoice? :)
#6
hummmmmmm, you can try forwarding it to Bill:
Bill Gates
1835 73rd Ave NE
Medina, WA 98039
;)
#7
Automatically closed -- issue fixed for 2 weeks with no activity.