• Hi,
    I’ve encountered a bug with the WEB-T – eTranslation Multilingual plugin (version 2.0.6) related to the language switcher markup.

    The data-text attribute is being generated with invalid HTML. Specifically:

    • The plugin includes inline HTML using unescaped double quotes.
    • It appends > at the end of the attribute value, which gets rendered as a visible "> before each language flag.

    Example of generated output:

    <span class="menu-text" data-text="<span ... ></span>"&gt;

    This results in:

    • Visually broken characters (">) next to the flag icons
    • Invalid HTML structure

    We’ve tried several frontend workarounds using JavaScript and CSS, but the issue seems to originate from how the plugin builds the data-text attribute.

    Could you please review and fix this in a future update?

    Happy to provide access or help debug further if needed.

    Thank you,
    Nelson Jerónimo

    • This topic was modified 6 months, 2 weeks ago by nvjeronimo.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter nvjeronimo

    (@nvjeronimo)

    Hi,
    I have currently hide the broken characters (">), with CSS declaration, that you guys can remove to see the problem, or just inspect the html.

    .etm-language-switcher-container > a {
    font-size: 0 !important;
    line-height: 2px !important;
    display: flex !important;
    align-items: center !important;
    }

    Hi,

    Thank you for reporting this issue and a workaround to fix it! We will investigate this and include the fix in the next plugin version.

    What is the theme you are using on your website? Is this issue also present if you switch it to a different theme?
    I see there is a difference in each anchor element HTML content. In your website it contains:

    <a href="https://mindsondigital.com/en/">
    <span class="menu-text" data-text="<span data-no-translation><img class=" etm-flag-image"="" src="https://mindsondigital.com/wp-content/plugins/etranslation-multilingual/assets/images/flags/en_GB.png" width="18" height="12" alt="en_GB" title="English"></span>
    "&gt;
    <span data-no-translation="">
    <img class="etm-flag-image" src="data:image/webp;base64,UklGRogBAABXRUJQVlA4THwBAAAvEcACAD/CKrZtJecZ7nx5DcpTgQpEcLf7aritbVuJLu7uELKogxaoja6IidxmJnJ3cRvbtlLdh7u7Z+TUQsvaAzGZu3yZ/8Af4g808ffj68cX4YduDHeNoAXYg5hWMRPR8Z8iSCLEMSD1I0KXn3f9qtmI5TCUSpIrgR9JPOCiQsHIVEkezv7Ui8ArMcOOtF9ny4l1PVbHb/c8d1bSUdlhTXstwQIYAANIAAhAA2hZsFKMa7820rxg96zGylGVMT84LTKsLyEL/lLLZ/ECR+wkpskw/sRD4IjA5BZ/fCL8dKeHLbUURVIzyeAwku20SWSHmZlRkjHMDP3XZCzhv4j+q23bhommdN3RZHFLB84Fgg5Y7eL3s3izg0anPJ002jZq6sXY16vK1TzmQGav9GMjoWsugUcON5eS4Cz2cpEFufh3ItFEAMlUmAiT6Jp5Var1Ww4P9iv1TMHlzhFwH3KUpsu7WplPBA0yGBCNn63V7Fve2BwYpgkcsPvdNQ==" alt="en_GB" title="English" data-pagespeed-url-hash="3051956016" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">
    </span>
    </a>

    Normally it would contain:

    <a href="/">
    <span data-no-translation="">
    <img class="etm-flag-image" src="/wp-content/plugins/etranslation-multilingual/assets/images/flags/en_GB.png" width="18" height="12" alt="en_GB" title="English">
    </span>
    </a>
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘HTML rendering bug in data-text attribute of language switcher’ is closed to new replies.