• Hi,
    I have a problem with > & < symbols display.
    In particular, I have a set of taxonomies that I created with a plugin. Terms in taxonomies contain < and > symbols.
    I have never had problems with these symbols displayng, but now I’m encountering this problem with a filter plugin.
    In particular, If I create a field where the user can select the taxonomies values, the > and < symbols are converted in > and < .
    These fields are created with shortcodes, so I can’t handle directly with the plugin. It could be interesting if I could convert the html characters with symbols using CSS, given that with Elementor widget I can set a custom CSS.
    Could you help me?
    Thanks

    Example

    • This topic was modified 2 years, 2 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    You cannot use CSS to convert single characters. For security, it’s essential that < is converted to an HTML entity. The issue is it is getting double encoded so that the output ends up displaying the entity code. Ideally something ought to be done to prevent double encoding.

    As a work around, try using a different unicode symbol that looks like < or >.
    For example ? is U+1438 and ? is U+1433.

    Thread Starter ita10

    (@ita10)

    Hi, thanks but I don’t know how to use this workaround… I’m using a plugin and I don’t know if I have to modify some php files or similar. Any suggestions?
    Thanks

    Moderator bcworkz

    (@bcworkz)

    You don’t have the ability to alter the option text through the plugin’s UI? If not, I’m not sure how the plugin comes up with the option text. If it’s hardcoded in its .php files, and if you can locate where in the files that is, you could directly edit the text via copy/paste. As long as the text you edit is within quotes, it should be safe to do so. Even so, it’s best to keep a backup copy of the original file.

    The problem with editing plugin files is you’ll lose your changes every time the plugin is updated. And forgoing updates can potentially introduce a significant security risk.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Convert > and and <’ is closed to new replies.