Skip to content
Snippets Groups Projects
Commit bc35275b authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Search.Filter.HTML: Return the first <title>.

There may be multiple <title>-tags in an html document where the
later are related to SVG.

Fixes #10020.
parent 80cd4510
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,6 @@
/lib/modules/Search.pmod/Database.pmod/MySQL.pike foreign_ident
/lib/modules/Search.pmod/Filter.pmod/Base.pike foreign_ident
/lib/modules/Search.pmod/Filter.pmod/Charset.pmod foreign_ident
/lib/modules/Search.pmod/Filter.pmod/HTML.pmod foreign_ident
/lib/modules/Search.pmod/Filter.pmod/PDF.pmod foreign_ident
/lib/modules/Search.pmod/Filter.pmod/PlainText.pmod foreign_ident
/lib/modules/Search.pmod/Filter.pmod/Word.pmod foreign_ident
......
// This file is part of Roxen Search
// Copyright 2000,2001 Roxen IS. All rights reserved.
//
// $Id: HTML.pmod,v 1.42 2007/03/16 14:45:38 jonasw Exp $
// $Id$
// Filter for text/html
......@@ -139,6 +139,7 @@ static string clean(string data) {
array(string) parse_title(Parser.HTML p, mapping m, string c, mapping e) {
if (e->noindex)
return ({ });
if (!res->fields->title)
res->fields->title = clean(c);
return ({c});
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment