The-seo-framework: Title Separator hyphen "-" is converted to en dash "–"

Created on 4 Jan 2019  Â·  2Comments  Â·  Source: sybrew/the-seo-framework

Via the_seo_framework()->escape_title(), wptexturize() converts a lone hyphen to an en-dash –.

This behavior is intended. However, there's an oversight: the hyphen title separator is also converted.
This separator yields the same value as the "ndash" option and defeats the purpose of the "recommended" (green border) status of the "hyphen" option (which implies no HTML rendering is required).

Other than rewriting the title output, there's no workaround available.

We could escape the title parts and merge them later. However, this imposes a security risk, as the escaping functions aren't aware of what's combined. Only site administrators can exploit this, but this includes multisite subsite-administrators without unfiltered-HTML privileges. Because of this, I won't fix this issue. However, I should brush away the "recommended" status.

See also:

[Element] Title [Type] Bug

All 2 comments

On second thought, we could still apply the aforementioned fix. All methods using this functionality escape the output when rendering. A full security review needs to take place, however.

I'd prefer a different workaround or removal of the hyphen option entirely.

We're going to remove the hyphen option and migrate all sites to the endash one who had it enabled previously.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ratzrattillo picture ratzrattillo  Â·  3Comments

epgunn picture epgunn  Â·  3Comments

9585999 picture 9585999  Â·  5Comments

alpipego picture alpipego  Â·  4Comments

Ciantic picture Ciantic  Â·  5Comments