Correctly process 'bookmarks' in html exported from Google Doc.

This commit is contained in:
Alexander Zolotarev 2017-04-19 14:47:27 -10:00
parent 24afc6a6fa
commit 87169d8953

View file

@ -115,6 +115,11 @@ static void CleanNode( TidyDocImpl* doc, Node *node )
else if (nodeIsA(child) && !child->content)
{
AttVal *id = TY_(GetAttrByName)( child, "name" );
/* Recent Google Docs is using "id" instead of "name" in
** the exported html.
*/
if (!id)
id = TY_(GetAttrByName)( child, "id" );
if (id)
TY_(RepairAttrValue)( doc, child->parent, "id", id->value );