amaresh19 / epubcheck

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

URLs containing "&" create errors #290

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
PROBLEM: Any URL that contains "&" creates an error.

METHOD: Any URL that contains an ampersand without a semicolon following it.

1. Find a URL. Example: 
http://www.sermonaudio.com/search.asp?seriesOnly=true&SourceID=gpts&keyworddesc=
The+Marrow+Controversy&keyword=The+Marrow+Controversy

2. Run ePub check 3.0.0 or 3.0.1

RESULT: Error expecting a semicolon.  "The reference to entity "SourceID" must 
end with the ';' delimiter."

EXPECTED: Going to correct URL.

PLATFORM: Mac OSX 10.6.8

Note: I apologize if this was addressed already. I went through several URL 
issues and didn't see anything that mentioned this. If an example file is 
required, I can create one but it will take a while. I am working on a 
published book, so I can't upload it here. Thanks for the help and this great 
program!

Original issue reported on code.google.com by scheva...@gmail.com on 25 Jul 2013 at 6:57

GoogleCodeExporter commented 9 years ago
That's the correct error, not a problem with epubcheck.

You have to use the entity & in XHTML to be valid XML (which includes in URLs). 
An ampersand demarcates the start of an entity and a semicolon the end, so the 
best a validator can determine is that you forgot to terminate the entity at 
the first character that is not valid in a name. You can only use "&" on its 
own in HTML where XML processing rules don't apply.

If you don't properly escape these, depending on the reading system the reader 
may either get an ugly error message stating the same, or the entire document 
simply may not appear.

Original comment by mgarrish on 26 Jul 2013 at 1:48

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks for the response! Sorry for posting this as an "issue".

Original comment by scheva...@gmail.com on 26 Jul 2013 at 2:56

GoogleCodeExporter commented 9 years ago

Original comment by tobias.c...@gmail.com on 3 Aug 2013 at 8:25