Problem/Motivation

If i create a cookie category title or description that contains an apostrophe character, it's saved and rendered fine but as soon a i reopen the category configuration form, the apostrophe is replance by it's utf8 value (&#039) and rendered escaped.

Steps to reproduce

Create a category with an apostrophe char in title and description
eg.

title:I'm a category
description: i'm a category description

Save it and reopen it and values will be replaced by :

title: I'm a category
description: i'm a category description

tested on 7.x-1.36

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ericdsd created an issue. See original summary.

ericdsd’s picture

Issue summary: View changes
ericdsd’s picture

Issue summary: View changes
ericdsd’s picture

Here is a patch against 7.x-1.36, it removes unneeded checkplain from form default values

svenryen’s picture

Thanks for your patch, will try to take a look in the next couple of weeks.

svenryen’s picture

Status: Active » Needs review
svenryen’s picture

@ericdsd Thanks for catching this issue.

However, I don't think we can remove check_plain from the code, since that could open a security hole.

As an alternative can we try using filter_xss?

Would be great if you could apply the attached patch and RTBC this issue.

ericdsd’s picture

Status: Needs review » Reviewed & tested by the community

Hi @svenryen i've tested the patch #7, it works like a charm.
Switched to RTBC.

  • svenryen committed a6926c8 on 7.x-1.x
    Issue #3208344 by ericdsd, svenryen: Special characters in Categories...
svenryen’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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