Thanks for the recent message about the tidy changes.
Karl, you asked about the site oranges.com and said links aren't working
and they used to.
There is something going on with the attribute data-source, and more
generally maybe with data-* attributes, which are part of html5.
A link in oranges looks like..
<a href="/wine-basket"
data-source="a1b9910284ad8c677b8d3ec4b464ce6ebbd0e6c7f8d8ead8b20bb80596edf86d1fa76d1417b2ca95bfd19c3ab9ff0bf6f9f98fbd283bd71e4e36b34ae70d2b852c6c61f8bc9cc7cfb33613393216eda8253513da19f726536504e22590e7d2b783a2e6357490c911d5fcab6b21cc911149047db90ccfdea7">Wine
Basket</a>
And the javascript later wants to reference:
$(this).attr("data-source")
Where this is the link that has just been clicked.
But that attribute isn't there, so it can't read/write its value to a
cookie, namely a hash corresponding to a given link destination. (I dunno
what was wrong with plain hyperlinks but that's what they use.)
I think tidy knows about these attributes, because they are referenced in
the tidy file attrs.c
So maybe we want to make a change in decorate.
I wonder what's missing. Maybe something in decorate. Should attributes
beginning with data-* be hardcoded, or should any arbitrary name-value
pair be passed along and use Attributes as a catch-all?
Here's the relevant function. It is document.scripts[2].data
$(function() {
$("a").click(function() {
document.cookie = "_utms=" +
($(this).attr("data-source") ? $(this).attr("data-source") :
"a1b9910284ad8c677b8d3ec4b464ce6ebbd0e6c7f8d8ead8b20bb80596edf86d1fa76d1417b2ca951a0ccb450672500b")
+ "; path=/";
});
$("form").submit(function() {
document.cookie = "_utms=" +
($(this).attr("data-source") ? $(this).attr("data-source") :
"a1b9910284ad8c677b8d3ec4b464ce6ebbd0e6c7f8d8ead8b20bb80596edf86d1fa76d1417b2ca951a0ccb450672500b")
+ "; path=/";
});
});
K
Date: Sun, 19 Nov 2017 08:32:43
From: Karl Dahlke <[email protected]>
To: [email protected]
Subject: www.oranges.com
The links on this page don't work, and I'm pretty sure they use to.
Line 113 {The Color Orange} {Wine Basket} etc
Just make a note of it if we don't have time to investigate right now.
Karl Dahlke
_______________________________________________
Edbrowse-dev mailing list
[email protected]
http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev