Last update breaks html lang tag
-
Hi there,
After the last update you add a template tag into the footer, which produces invalid html if the strip regional tags with the new – Added Advanced option to change html lang attribute to a region independent form option – is enabled (outputting <html lang=”de”> instead of html lang=”de_DE”), this should also be done in the new function so the lang tags match!
Your very last checkin broke it: svn #2749599, the function that is called is the following:
/** * @param $output * @return $output * * adds a new attribute in footer, tp_language_lang, for Automatic User Language Detection to rely on for finding the current language */ public function add_tp_language_lang_attribute(){ global $TRP_LANGUAGE; $html ='<template id="tp-language" lang="'. esc_attr($TRP_LANGUAGE) . '"></template>'; echo $html; /* phpcs:ignore *///ignored because the html is constructed by us }
if i choose to strip the regional tags via the option in your plugin panel. the regional tag is still present in the footer lang tag you are outputting in that new function, so i have 2 different lang tags on my page which results basically in invalid html!
Can you please strip the regional tags also from that output of the add_tp_language_lang_attribute function like you do in the html tag(change_lang_attr_in_html_tag function) if that strip regional tag setting is on, and release a quick bugfix so i can also update to the new version… I donwgraded for now.
Thanks a lot,
Paul
- The topic ‘Last update breaks html lang tag’ is closed to new replies.