Problem/Motivation

When using the name format parser in a custom module, it's useful to be able to get the raw generated name. Right now, the parser only allows to return HTML escaped text.

This is an issue when you want to set the node title to the generated name, because then the name gets double escaped, as also said in #2672558-8: Optional full name applied to title of nodes containing name field.

Consider a name with the following in it (a Dutch surname prefix):

van 't

When displayed, this becomes:

van 't

Proposed resolution

Add a new markup option called 'raw' to the name format parser and let that return the raw formatted name.

Remaining tasks

  • Review.
  • Commit.

User interface changes

A new markup option called 'raw' becomes available.

API changes

None.

Data model changes

None.

Patch (with a test) will follow.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MegaChriz created an issue. See original summary.

MegaChriz’s picture

This adds a markup option called "raw". The tests-only patch should fail.

The last submitted patch, 2: name-raw-markup-3143823-2-tests-only.patch, failed testing. View results

nkoporec’s picture

Status: Needs review » Needs work

This needs rebase, otherwise good to go, really cool that you provided a patch with tests, thanks!

ankithashetty’s picture

Status: Needs work » Needs review
FileSize
1.59 KB

Re-rolled the patch in #2 as suggested by @nkoporec in #4... Hope this helps in moving the issue forward, Thanks!

nkoporec’s picture

Status: Needs review » Fixed

comitted, thanks !

Status: Fixed » Closed (fixed)

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