View Single Post
Old 08-08-2014, 07:44 PM   #9
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,553
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I realize my approach might seem a bit "nuclear" (removing all opening/closing/self-closing anchor tags in a document), but if you step through one at a time and make sure you don't delete an open tag but skip the close-tag (or vice-versa), it's not so bad. And it certainly leaves "link" stuff in the header alone.

Besides, I think we can all agree that the mass removal of <a> tags is fraught with peril to begin with. Even if you only focus on the seemingly innocuous ones with href attributes, that doesn't mean the "id"s of those anchors aren't the targets of nav elements in the ncx file, or spine/guide elements in the opf. In fact, that's especially likely in the case of some of those chapter-header monstrosity structures you pointed out.

So with all that in mind ... it seemed like you were in a bit of the "Damn the torpedoes! ... I've got checkpoints set" frame of mind anyway.

Last edited by DiapDealer; 08-08-2014 at 07:46 PM.
DiapDealer is offline   Reply With Quote