<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>1) The best way is to recognise it and either fall back to something sane or refuse to deal with the module without crashing. You could presumably if an xml chunk is delivered by the engine to you and is not internally valid ask the engine to re-render it plainly and spit out some message to that effect on the terminal. Then a use may be in the position to see this and send a bug report to whoever is responsible for the dodgy module.
<div>&nbsp;</div>

<div>2) CrossWire modules are for teh last 10 years or so always tested and validated before they are published but other repositories are subject to their own rules. The module you reference is from eBible and not CrossWire. But - admittedly - we have in CrossWire still a lot of old modules which may well have bugs which only show up slowly.</div>

<div>&nbsp;</div>

<div>Peter</div>

<div>&nbsp;</div>

<div>&nbsp;</div>

<div>&nbsp;
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b>&nbsp;Mittwoch, 17. Juli 2019 um 07:13 Uhr<br/>
<b>Von:</b>&nbsp;&quot;Tobias Klein&quot; &lt;contact@tklein.info&gt;<br/>
<b>An:</b>&nbsp;&quot;SWORD Developers&#39; Collaboration Forum&quot; &lt;sword-devel@crosswire.org&gt;<br/>
<b>Betreff:</b>&nbsp;[sword-devel] How to deal with invalid markup?</div>

<div name="quoted-content">
<div style="background-color: rgb(255,255,255);">
<p>Hi everyone,</p>

<p>Is there a recommended way on how to deal with invalid markup (in a frontend) when using the text from a Sword module?</p>

<p>To me invalid markup is basically invalid XML.<br/>
You find an example below (Exodus 3:22 / engNET2016eb).<br/>
<br/>
Are Sword modules validated with standard XML validation tools before being published?</p>

<p>Best regards,<br/>
Tobias<br/>
&nbsp;</p>

<p>Module: engNET2016eb</p>

<p>Mark-up text of Exodus 3:22 (module-&gt;getRawEntry()):</p>

<p><font size="-1">&lt;w lemma=&quot;strong:H802&quot;&gt;Every&lt;/w&gt; &lt;w lemma=&quot;strong:H802&quot;&gt;woman&lt;/w&gt; &lt;w lemma=&quot;strong:H7592&quot;&gt;will ask&lt;/w&gt; &lt;w lemma=&quot;strong:H7934&quot;&gt;her neighbor&lt;/w&gt; &lt;w lemma=&quot;strong:H1481&quot;&gt;and the one who happens to be&nbsp; staying&lt;/w&gt; &lt;w lemma=&quot;strong:H1004&quot;&gt;in her house&lt;/w&gt; &lt;w lemma=&quot;strong:H3627&quot;&gt;for items&lt;/w&gt; &lt;w lemma=&quot;strong:H3701&quot;&gt;of silver&lt;/w&gt; &lt;w lemma=&quot;strong:H2091&quot;&gt;and gold&lt;/w&gt; &lt;w lemma=&quot;strong:H8071&quot;&gt;and for clothing&lt;/w&gt;. &lt;w lemma=&quot;strong:H7760&quot;&gt;You will put&lt;/w&gt; &lt;w lemma=&quot;strong:H3627&quot;&gt;these articles&lt;/w&gt; &lt;w lemma=&quot;strong:H5921&quot;&gt;on&lt;/w&gt; &lt;w lemma=&quot;strong:H1121&quot;&gt;your sons&lt;/w&gt; &lt;w lemma=&quot;strong:H1323&quot;&gt;and daughters&lt;/w&gt; &lt;w lemma=&quot;strong:H5337&quot;&gt;&ndash; thus you&lt;/w&gt;<br/>
<br/>
INVALID section starts here:</font></p>

<p><font size="-1">&lt;w lemma=&quot;strong:H4713&quot;&gt;will plunder Egypt&lt;/w&gt;<b><font color="#ff0000">!&rdquo; &lsquo;</font></b>span class=&rdquo;footnote&rdquo; id=&rdquo;footnote-65&rdquo;<b><font color="#ff0000">&rsquo;&lsquo;</font></b>span class=&rdquo;key&rdquo;&rsquo;65&lsquo;<br/>
&lt;w lemma=&quot;strong:H7760&quot;&gt;a&lt;/w&gt;<b><font color="#ff0000"> </font></b>href=&rdquo;#note-65&rdquo; class=&rdquo;backref&rdquo;&rsquo;<font color="#ff0000"><b>3:19&lsquo;/a&rsquo;&lsquo;</b></font>span class=&rdquo;text&rdquo;&rsquo; &lt;hi type=&quot;italic&quot;&gt;tn&lt;/hi&gt;: &lt;hi type=&quot;italic&quot;&gt;Heb&lt;/hi&gt; &ldquo;<br/>
<br/>
&lt;w lemma=&quot;strong:H1121&quot;&gt;and&lt;/w&gt; &lt;w lemma=&quot;strong:H1121&quot;&gt;not&lt;/w&gt; &lt;w lemma=&quot;strong:H1004&quot;&gt;with&lt;/w&gt; &lt;w lemma=&quot;strong:H7760&quot;&gt;a&lt;/w&gt; mighty hand.&rdquo;<br/>
...</font></p>
_______________________________________________ sword-devel mailing list: sword-devel@crosswire.org <a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a> Instructions to unsubscribe/change your settings at above page</div>
</div>
</div>
</div>
</div></div></body></html>