This obviously limits the number of tags one can add especially since they need to be surrounded by <> and delimited by spaces. In looking through the code it appears as though the allowed html tags get stored in the variables table as serialized data, into a longtext field. So it's not as if the data is being stored in a VARCHAR db field with a limit of 255 chars.

Can the maxlength be removed or can someone post an explanation as to why limiting it to 255 chars is necessary?

CommentFileSizeAuthor
#2 filter_allowed_html_maxlength.patch845 bytesrobloach

Comments

btully’s picture

note that if one deletes the '#maxlength' => 255 from filter.module it then gets reset to maxlength="128" in the form.

ewwww.

robloach’s picture

Version: 5.3 » 6.x-dev
Priority: Critical » Minor
Status: Active » Needs review
StatusFileSize
new845 bytes

New features belong to 6.x-dev.

The default maxlength for textfields is 128, so removing it is not the solution. I assume this issue came up earlier so the design decision was just to double(ish) the amount of allowed characters. If we were to take action on this, and it has been proven to be an issue, I'd suggest doubling it even further to 512. It seems in the hands of the core committers now.

BioALIEN’s picture

Status: Needs review » Closed (duplicate)
nrauni’s picture

i tried put this code in my template.php file and do a condition...

function phptemplate_textfield($element) {

$size = empty($element['#size']) ? '' : ' size="'. $element['#size'] .'"';

if( $element['#id'] != 'edit-taxonomy-tags-2' ) {
$maxlength = ' maxlength="9999"';
}

$class = array('form-text');
$extra = '';
$output = '';

if ($element['#autocomplete_path']) {
drupal_add_js('misc/autocomplete.js');
$class[] = 'form-autocomplete';
$extra = ' TRUE))) .'" disabled="disabled" />';
}
_form_set_class($element, $class);

if (isset($element['#field_prefix'])) {
$output .= ''. $element['#field_prefix'] .' ';
}

$output .= '';

if (isset($element['#field_suffix'])) {
$output .= ' '. $element['#field_suffix'] .'';
}

return theme('form_element', $element, $output) . $extra;

}

this code remove the maxlength only of my tag field.... but it not validate...

how can i change it???

damien tournoud’s picture

This issue is now solved in 6.4.

BioALIEN’s picture

Status: Closed (duplicate) » Closed (fixed)

And it has been backported to the latest 5.x branch too.

Issue closed.