Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292418

Search module declares potentially incorrect snippet language

$
0
0

#867114: Search results should add lang tag if language of search result differs introduced an xml:lang attribute on certain search results whose declared language differed from the currently displayed language. This prevents snippet title and snippet text from inheriting the ancestral language.

I don't think search/node module can claim to know the language of the snippet though as it will just strip tags, removing any language context from the content. Consider the following node in language "nl":

<p>De titel van ons nieuwste boek: <span xml:lang="en">The Late Roman Cemeteries; Stray Finds and Excavations</span></p>

Searching for "boek" gives the following, incorrect fragment:

<p class="search-snippet" xml:lang="nl">        De titel van ons nieuwste <strong>boek</strong>:   The Late Roman Cemeteries; Stray Finds and Excavations            ...</p>

Should it not specify xml:lang=""? (or maybe xml:lang="und" ? need to digg for the correct xhtml spec).


Viewing all articles
Browse latest Browse all 292418

Trending Articles