{"id":2015,"date":"2003-12-09T15:40:38","date_gmt":"2003-12-10T07:40:38","guid":{"rendered":"http:\/\/michaelhans.com\/eclecticism\/2003\/12\/09\/safari-bug-amazon-associates-build-a-link\/"},"modified":"2019-12-06T14:38:12","modified_gmt":"2019-12-06T22:38:12","slug":"safari-bug-amazon-associates-build-a-link","status":"publish","type":"post","link":"https:\/\/michaelhans.com\/eclecticism\/2003\/12\/09\/safari-bug-amazon-associates-build-a-link\/","title":{"rendered":"Safari bug: Amazon Associates Build-A-Link"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:12692,&quot;href&quot;:&quot;http:\\\/\\\/www.amazon.com\\\/gp\\\/associates\\\/build-links\\\/product-search.html\\\/103-2792872-9098222?t=djwudicom-20&quot;,&quot;archived_href&quot;:&quot;&quot;,&quot;redirect_href&quot;:&quot;https:\\\/\\\/www.amazon.com\\\/gp\\\/associates\\\/build-links\\\/product-search.html\\\/103-2792872-9098222?t=djwudicom-20&quot;,&quot;checks&quot;:[],&quot;broken&quot;:false,&quot;last_checked&quot;:null,&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:12631,&quot;href&quot;:&quot;http:\\\/\\\/weblogs.mozillazine.org\\\/hyatt\\\/archives\\\/2003_12.html#004377&quot;,&quot;archived_href&quot;:&quot;&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[],&quot;broken&quot;:false,&quot;last_checked&quot;:null,&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<p><a href=\"https:\/\/michaelhans.com\/eclecticism\/2003\/12\/graphics\/amazonbug.html\" title=\"Safari\/Amazon bug screenshot\"><img loading=\"lazy\" decoding=\"async\" alt=\"Safari\/Amazon bug screenshot\" src=\"https:\/\/michaelhans.com\/eclecticism\/2003\/12\/graphics\/amazonbug-thumb.jpg\" width=\"150\" height=\"122\" align=\"right\" \/><\/a><\/p>\n<p>I&#8217;ve been noticing a bug in Safari over the past few days, and finally figured it was worth writing up and seeing if this is a &#8220;just me&#8221; thing or not.<\/p>\n<p>I just recently started using the <a href=\"http:\/\/www.amazon.com\/gp\/associates\/build-links\/product-search.html\/103-2792872-9098222?t=djwudicom-20\" title=\"Amazon Associates Build-A-Link\">Amazon Associates Build-A-Link<\/a> tool to create the product boxes for certain items that I talk about (like the one for Season 7 of Deep Space Nine in this morning&#8217;s post). Unfortunately, once I find the item I want to create the product box for, when Amazon sends me the page that is supposed to give me the appropriate HTML code to copy and paste into my entry, the <code>textarea<\/code> field is blank. In order to get the code, I&#8217;ve either been using Internet Explorer (shudder) or just viewing the source code for the Amazon page and digging through until I find the code snippet in question.<\/p>\n<p>The code in question is found about 80% of the way down the source code. Here&#8217;s the relevant section of what Amazon sends, with what I <em>should<\/em> be seeing in that blank box on line six:<\/p>\n<pre><code>&lt;tr&gt;\n  &lt;td&gt;\n    &lt;form name=\"snippet_form\"&gt;\n      &lt;center&gt;\n        &lt;textarea name=\"snippet\" rows=\"7\" cols=\"35\"&gt;\n          &lt;iframe marginwidth=\"0\" marginheight=\"0\" width=\"120\" height=\"240\" scrolling=\"no\" frameborder=\"0\" src=\"http:\/\/rcm.amazon.com\/e\/cm?o=1&amp;l=as1&amp;f=ifr&amp;t=djwudicom-20&amp;p=8&amp;asins=B00008KA57&amp;IS2=1&amp;lt1=_blank\"&gt;&lt;MAP NAME=\"boxmap-p8\"&gt;&lt;AREA SHAPE=\"RECT\" COORDS=\"14, 200, 103, 207\" HREF=\"http:\/\/rcm.amazon.com\/e\/cm\/privacy-policy.html?o=1\" &gt;&lt;AREA COORDS=\"0,0,10000,10000\" HREF=\"http:\/\/www.amazon.com\/exec\/obidos\/redirect-home\/djwudicom-20\" &gt;&lt;\/MAP&gt;&lt;img src=\"http:\/\/rcm-images.amazon.com\/images\/G\/01\/rcm\/120x240.gif\" width=\"120\" height=\"240\" border=\"0\" usemap=\"#boxmap-p8\" alt=\"Shop at Amazon.com\"&gt;&lt;\/iframe&gt;\n       &lt;\/textarea&gt;\n        &lt;br \/&gt;\n        &lt;input type=\"image\" style=\"margin: 3px;\" src=http:\/\/g-images.amazon.com\/images\/G\/01\/associates\/build-links\/highlight_html.gif name=\"highlight\" onClick=\"javascript:this.form.snippet.focus();this.form.snippet.select(); return false;\"\/&gt;\n        &lt;p style=\"margin: 5px;\"&gt;&lt;font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"-2\"&gt;Paste all the HTML into your Web site's HTML.&lt;br \/&gt; Note: your tracking ID, &lt;strong&gt;djwudicom-20&lt;\/strong&gt;, is already embedded in the HTML.&lt;\/font&gt;&lt;\/p&gt;\n      &lt;\/center&gt;\n    &lt;\/form&gt;\n  &lt;\/td&gt;\n&lt;\/tr&gt;\n<\/code><\/pre>\n<p>My immediate guess is that because the code ends up looking as if it&#8217;s requesting an <code>iframe<\/code> inside a <code>textarea<\/code>, Safari is just discarding what it sees as &#8220;bad code&#8221;. Unfortunately, as placing code inside a <code>textarea<\/code> is a fairly common way to avoid issues with long text strings that muck up a page&#8217;s layout (such as, well, this very post), that behavior effectively breaks the Amazon tool.<\/p>\n<p>I&#8217;ve submitted a bug through Safari&#8217;s bug reporting feature, but I figured sending a TrackBack ping to <a href=\"http:\/\/weblogs.mozillazine.org\/hyatt\/archives\/2003_12.html#004377\" title=\"Surfin' Safari: Progress Report\">Dave of Surfin&#8217; Safari<\/a> couldn&#8217;t hurt, either. ;)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m battling a Safari bug on the Amazon Associates Build-A-Link tool where code inside a textarea doesn&#8217;t appear when the page is rendered.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2040],"tags":[65],"class_list":["post-2015","post","type-post","status-publish","format-standard","hentry","category-blog","tag-technology"],"_links":{"self":[{"href":"https:\/\/michaelhans.com\/eclecticism\/wp-json\/wp\/v2\/posts\/2015","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michaelhans.com\/eclecticism\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michaelhans.com\/eclecticism\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michaelhans.com\/eclecticism\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michaelhans.com\/eclecticism\/wp-json\/wp\/v2\/comments?post=2015"}],"version-history":[{"count":0,"href":"https:\/\/michaelhans.com\/eclecticism\/wp-json\/wp\/v2\/posts\/2015\/revisions"}],"wp:attachment":[{"href":"https:\/\/michaelhans.com\/eclecticism\/wp-json\/wp\/v2\/media?parent=2015"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michaelhans.com\/eclecticism\/wp-json\/wp\/v2\/categories?post=2015"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michaelhans.com\/eclecticism\/wp-json\/wp\/v2\/tags?post=2015"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}