Closed (fixed)
Project:
Webform
Version:
5.x-1.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Jul 2007 at 14:09 UTC
Updated:
1 Feb 2008 at 00:53 UTC
I've noticed that markup items with a value over 30 characters are escaped to display in the component table and markup items shorter than that aren't. Caused lots of bafflement when trying to wrap form elements in a table by accidentally closing the table. Sorry, not a diff but here's the modification to the top of _webform_add_rows:
function _webform_add_rows($cid, $component, $level, &$form, &$rows) {
// Create presentable values
if (strlen($component['value']) > 30) {
$component['value'] = htmlspecialchars(substr($component['value'], 0, 30), ENT_QUOTES);
$component['value'] .= "...";
>> } else {
>> $component['value'] = htmlspecialchars($component['value'], ENT_QUOTES);
}
Comments
Comment #1
quicksketchThanks. I removed the htmlspecialchars() calls from the IF statement and just did a check_plain() afterwards so all values will be html encoded.
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.