[sword-devel] libsword issue in handling XML entities such as &
David Haslam
dfhdfh at protonmail.com
Sat Aug 2 09:40:27 EDT 2025
Hi DM,
Does this part of your reply contain a typo?
> Also, osis2mod will properly convert it to & And it will output a diagnostic for the conversion.
Best regards,
David
Sent with [Proton Mail](https://pr.tn/ref/SWXT9A5YZ67G) secure email.
On Thursday, July 31st, 2025 at 2:35 PM, DM Smith <dmsmith at crosswire.org> wrote:
> See below.
>
>> On Jul 31, 2025, at 8:53 AM, David Haslam <dfhdfh at protonmail.com> wrote:
>>
>> Hi DM,
>>
>> Further to the feedback relating to the recent updates of the FreGeneve1669 module...
>>
>> Has anyone yet created an issue in JIRA for the failure of libsword to output the & character wherever a module contains the XML entity & ?
>
> I didn’t see any when I surveyed the Jira issues. I noticed that &c. is quite common in the KJV margin notes, and front matter.
>
>> Which other XML entities have the same issue?
>>
>> - Likely candidates include < and >
>>
>> - There may be others such as ' and "
>
> Yes these are other possible problems.
>
>> Does the issue also pertain to their numerical equivalents, whether in decimal or hexadecimal form? e.g. &x#0027;
>
> We have a Jira issue to convert these to their unicode equivalent. I’m almost done with that code, having started yesterday.
>
>> Any remedy should also take account that some such entities are also valid when the name is uppercase, e.g. &
>
> The remedy is that xmllint will complain as it is not valid in xml. This should be a friend of all OSIS module makers.
>
> Also, osis2mod will properly convert it to & And it will output a diagnostic for the conversion.
>
>> Further reading: https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
>>
>> Best regards,
>>
>> David
>>
>> Sent with [Proton Mail](https://pr.tn/ref/SWXT9A5YZ67G) secure email.
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://crosswire.org/pipermail/sword-devel/attachments/20250802/750a69ef/attachment.htm>
More information about the sword-devel
mailing list