View Single Post
Old 11-28-2015, 11:57 AM   #108
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: 8,932
Karma: 6361444
Join Date: Nov 2009
Device: many
Hi rubeus,

You are not doing anything wrong. That was a bug for any file added that passed it incorrectly through an xml repair routine (instead of an xhtml aware repair routine like gumbo) that was introduced in Sigil-0.8.900 series someplace that is fixed in Sigil-0.9.1.

The xml parser had no xhtml dtd to work with and so did not understand that img was a void tag (self-closing) and thus it introduced the error.

I have a release build of Sigil-0.9.1 on my machine (ready for a release after US Thanksgiving) and your plugin code runs quite well on my machine.

Here is the output of your plugin code running on the Sigil_Plugin_Framework_rev6.epub:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Allpics</title>
</head>
<body>
  <div class="cimg">
    <img alt="" src="../Images/Manage_Plugins.jpg" style="max-width: 880px" />
  </div>

  <div class="cimg">
    <img alt="" src="../Images/Sigil_Plugins_Menu.jpg" style="max-width: 904px" />
  </div>

  <div class="cimg">
    <img alt="" src="../Images/PluginRunner.jpg" style="max-width: 791px" />
  </div>

</body>
</html>
If you try the Sigil-0.8.6 build or maybe some later builds, you will see that bug did not exist. If you use a Mac, I would be happy to privately post a version of the forthcoming Sigil-0.9.1 for you to continue development with. If you have Linux, and build from source (github.com master) you should also be good to go.

Sorry about that. I inadvertently introduced that bug when fixing another plugin related bug.

KevinH
KevinH is offline   Reply With Quote