![]() |
#1 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Sep 2011
Device: iPhone 3G
|
Google Analytics URLs won't validate
I have the following url:
Code:
<a href="http://example.com/?utm_source=book%2Btitle&utm_medium=ebook&utm_content=other%2Bbook&utm_campaign=ebook%2Bclicks">example.com</a> Code:
The operation you requested cannot be performed because book_split_007.xhtml is not a well-formed XML document. An error was found on line 412, column 111: unterminated entity reference 'utm_medium'. So it seems to not understand that the code is in an href. |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,251
Karma: 3720310
Join Date: Jan 2009
Location: USA
Device: Kindle, iPad (not used much for reading)
|
It could possibly be because that is not an existing document, or because the slash at the end of the domain, followed directly by the question mark, is unusual. Normally, when parameters are passed, there is a program name after the slash, and before the question mark. Maybe the validation algorithm didn't expect that combination?
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
|
You need to change the '&'s to '&'s otherwise the XML parser thinks they are the start of entities.
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Sep 2011
Device: iPhone 3G
|
I forgot this is an xml document not an html. Thanks!
|
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 17
Karma: 10
Join Date: Jul 2012
Location: Left Coast
Device: Kindle/generic android tablet
|
Hi,
I am experiencing this same 'unterminated entity reference' when Sigil finds an '&' in an html link within my epub. It is like the above example, and I tried replacing the '&' with '&' but then this breaks my link (which is an affiliate link to a product at an online store). Is there any work around to get Sigil to ignore this...or will I need to manually edit the xhtml outside of Sigil and then re-zip the files into an epub as the final step before publishing to Apple/B&N, etc. Thanks in advance! |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
No, it should work. In which view are you making the change?
|
![]() |
![]() |
![]() |
#7 |
Member
![]() Posts: 17
Karma: 10
Join Date: Jul 2012
Location: Left Coast
Device: Kindle/generic android tablet
|
I made the edit in 'code view' (see below)
<a href="http://www.shareasale.com/r.cfm?u=666470&b=358708&m=37742&afftra ck=rng&urllink=www%2Ebotachtactical%2Ecom%2Fta grho%2Ehtml">MR Grappling hook</a> Sigil likes that..no error now, but if I then try the modified link in my browser it is broken at the link target's server end due to the & substitutions I think. |
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Do you know there is a space in the link? I don't know if that is on purpose or a copy/past error. Spaces can create an issue in links. You can replace it by %20 if I remember correctly.
|
![]() |
![]() |
![]() |
#9 |
Member
![]() Posts: 17
Karma: 10
Join Date: Jul 2012
Location: Left Coast
Device: Kindle/generic android tablet
|
You are right, but yes I thick that was a paste error (it doesn't work even with it removed).
I did more tests and it seems that the issue is at the target server which doesn't like the XHTML-correct link. I work with other affiliate links that contain 'ampersand%;' and they do function correctly. Luckily this one had another option to create shortened "license plate" links, as favored by social network sites etc. When I did it that way is was a much shorter one with no ampersand headaches. So this isn't an issue for me within Sigil anymore. Thanks again. |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
my epub won't validate, please help? | moonmyst532 | ePub | 6 | 02-19-2011 06:17 PM |
mouse click tracking or analytics? | PChuprina | ePub | 3 | 10-29-2010 11:44 PM |
Validate ePub | Haya | Sigil | 8 | 11-27-2009 05:32 PM |
Google analytics slowing things down | pilotbob | Feedback | 17 | 02-11-2009 11:41 AM |