nooyoo11 / epubcheck

Automatically exported from code.google.com/p/epubcheck
MIT License
1 stars 0 forks source link

Invalid XML File generated from EpubCheck 3 #245

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
PROBLEM:

If an ebook filename contains an ampersand character, the resulting XML file 
generated from epubcheck 3.0 is not valid. 

METHOD:

What steps will reproduce the problem?

0. Assume you have an ebook called 'T:\Calibre\James Patterson\Hide & Seek 
(1196)\Hide & Seek - James Patterson.epub'. Any ebook with an '&' in the 
filename will do.

1. In console enter: java -jar 
"Q:\Data\Clients\TE\TEEBook\TEBatchEpub\bin\Debug\epubcheck-3.0.jar" -out 
"C:\Users\Admin\AppData\Local\Temp\TEEpubCheck\Hide & Seek - James Patterson 
[FD-AD-BF-FB-4A-7F-FC-2A-C8-23-C7-0E-18-94-30-37-05-B7-6D-76].xml" 
"T:\Calibre\James Patterson\Hide & Seek (1196)\Hide & Seek - James 
Patterson.epub"

2. Examine resulting C:\Users\Admin\AppData\Local\Temp\TEEpubCheck\Hide & Seek 
- James Patterson 
[FD-AD-BF-FB-4A-7F-FC-2A-C8-23-C7-0E-18-94-30-37-05-B7-6D-76].xml file.

RESULT:

The XML file generated:

...
<repInfo uri="Hide & Seek - James Patterson.epub">
...

Visual Studio 2010 vb.net code can't parse it without an error:

  Dim lobjXmlDocument As XPathDocument

        Me.clear()

        Try
            lobjXmlDocument = New XPathDocument(mFullFileName) <- Error

        Catch ex As Exception

            mErrorString = ex.Message
            Return False

        End Try

EXPECTED:

...
<repInfo uri="Hide &amp; Seek - James Patterson.epub">
...

PLATFORM:

MS Windows 7, EpubCheck 3.0, from the console.

Original issue reported on code.google.com by edarksw...@gmail.com on 25 Jan 2013 at 5:38

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r420.

Original comment by tledou...@gmail.com on 8 Mar 2013 at 10:15

GoogleCodeExporter commented 9 years ago

Original comment by markus.g...@gmail.com on 26 Mar 2013 at 10:39