From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (mailfrom) identity=mailfrom; client-ip=8.23.224.61; helo=out.smtp-auth.no-ip.com; envelope-from=kevin@carhart.net; receiver= X-Greylist: delayed 590 seconds by postgrey-1.37 at hurricane.the-brannons.com; Wed, 22 Nov 2017 00:51:31 PST Received: from out.smtp-auth.no-ip.com (smtp-auth.no-ip.com [8.23.224.61]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 5BC77779A3 for ; Wed, 22 Nov 2017 00:51:31 -0800 (PST) X-No-IP: carhart.net@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from carhart.net (unknown [99.52.200.227]) (Authenticated sender: carhart.net@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 49A59437 for ; Wed, 22 Nov 2017 00:43:06 -0800 (PST) Received: from carhart.net (localhost [127.0.0.1]) by carhart.net (8.13.8/8.13.8) with ESMTP id vAM8h4j1024692 for ; Wed, 22 Nov 2017 00:43:05 -0800 Received: from localhost (kevin@localhost) by carhart.net (8.13.8/8.13.8/Submit) with ESMTP id vAM8h4ko024668 for ; Wed, 22 Nov 2017 00:43:04 -0800 Date: Wed, 22 Nov 2017 00:43:04 -0800 (PST) From: Kevin Carhart To: Edbrowse-dev@lists.the-brannons.com In-Reply-To: <20171016072958.eklhad@comcast.net> Message-ID: References: <20171016072958.eklhad@comcast.net> User-Agent: Alpine 2.03 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: [Edbrowse-dev] data-* attributes X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.24 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Nov 2017 08:51:31 -0000 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.. Wine Basket 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 To: kevin@carhart.net 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