Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() (line .....\includes\bootstrap.inc). from 7.8 localized distribution for content translated (using Entity Translation module & i18n) site.

Enabling Title module (7.x-1.x-dev or alpha-2) gives warning - uninstalling removes it.

The Title of node doesn't appear in table UI at Home » Administration
>> Content (just the table column header 'Title') when enabled but does appear on published node.

Comments

Anonymous’s picture

Same problem here.

uncoolbob’s picture

Warning: strip_tags() expects parameter 1 to be string, array given in node_build_content() (line 1372 of /home/maccallr/drupaltesting/apache/httpd-2.2.14/htdocs/drupaltest/modules/node/node.module).

I get something similar when enabling a non-plain text processing method (e.g. filtered HTML) in order to try to get italics for a species name (e.g. Homo sapiens) as node title.

Greg Sims’s picture

Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() (line 1572 of .../includes/bootstrap.inc).

Same thing here. This happened when I turned on "filtered text" for the title field of a content type. I'm working with a website in Spanish and the title of the node translation is:

¿Quien es el Mayor?

The html entity at the beginning of this title is the upside down question mark that begins a question in Spanish. I need this to be converted to the upside down question mark character when the title is displayed.

Feet’s picture

I get the same thing when I enable 'Filtered text' for the Title field (which is what I want to do with the module).

Any solutions so far?

Greg Sims’s picture

I implemented a workaround for this issue. I changed $title to html_entity_decode($title, ENT_QUOTES) in page.tpl.php. I also changed $head_title to html_entity_decode($head_title, ENT_QUOTES) in html.tpl.php. This is clearly not a good solution to this issue but perhaps it will help someone as a workaround.

plach’s picture

Title: Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() » Allow using HTML in replaced labels
Version: 7.x-1.0-alpha2 » 7.x-1.x-dev
Category: bug » feature
Greg Sims’s picture

@plach Are you sure this is a "feature request"? I'm not sure how you build a multi-language site without having special characters (like the upside down question mark for Spanish) in the node title. Is there another way?

plach’s picture

Plain text supports the whole utf8 set pretty well, you don't need html for it to render properly.

andros’s picture

I can't render superscript and subscript characters with utf-8

andros’s picture

I work on an project which includes a biology website.

In this case would really make sens to have the ability for simple html in the title field, like superscript and subscript.
But as far as i can say drupal is filtering html out.

I don't think we need to filter all html out on the title field, some html tags can be really useful in some cases.

plach’s picture

I agree this is a desirable feature, I'm just saying it's not a bug. And I have no time to work on this, unfortunately. Hopefully, if this is so badly needed as it seems, someone (including me) sooner or later will provide a patch.

plach’s picture

Priority: Normal » Major

This is the only beta-blocker I see in the issue queue.

raulmuroc’s picture

Come'n we should move this issue! :-) and fix it!

acrollet’s picture

Issue summary: View changes
Status: Active » Fixed

At least as of 7.x-1.0-alpha7+7-dev, I am able to use an HTML input format with a title field without any issues.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.