View Single Post
Old 09-20-2017, 10:44 AM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,696
Karma: 5444398
Join Date: Nov 2009
Device: many
Okay I checked src/Exporters/NCXWriter.cpp

and we use:

m_Writer->writeAttribute("id", QString("navPoint-%1").arg(play_order));

So guaranteed to not begin with a digit.

We do similar things in python3lib/ncxgenerator.py so our auto conversion routines from nav to ncx should be fine there.

I also checked the nav for epub3: src/ResourceObjects/NavProcessor.cpp
and it does not use "id" in a similar manner so we are okay there as well.

I did see lots of calls to Gumbo's get_local_text_of_node() and there are no calls to simplified so we should probably add some simplify calls to the NavProcessor.cpp every time we use get_local_text_of_node just to be safe. That said a newline in an html document will just become a space and multiple spaces are condensed in html, so for the nav this may not matter too much.

Last edited by KevinH; 09-20-2017 at 10:46 AM.
KevinH is online now   Reply With Quote