[Webkit-unassigned] [Bug 13102] REGRESSION: Javascript error messages on patagonia.com (prototype.js 1.4.0)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 5 11:15:29 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=13102





------- Comment #7 from ddkilzer at webkit.org  2007-04-05 11:15 PDT -------
The code below is NOT a part of Prototype.js 1.4.0.  Apparently it has been
added by the site's author, which makes it more likely an evangelism bug.

http://dev.conio.net/repos/prototype/pkg/prototype-1.4.0.tar.gz

(In reply to comment #2)
> The code that's borken (which may or may not be a legitimate bug):
> 
> var Cookie = {
>   set: function(name, value, daysToExpire) {
>     var expire = '';
>     if (daysToExpire != undefined) {
>       var d = new Date();
>       d.setTime(d.getTime() + (86400000 * parseFloat(daysToExpire)));
>       expire = '; expires=' + d.toGMTString();
>     }
>     return (document.cookie = escape(name) + '=' + escape(value || '') +
> expire);
>   },
>   get: function(name) {
>     var cookie = document.cookie.match(new RegExp('(^|;)\\s*' + escape(name) +
> '=([^;\\s]*)'));
>     return (cookie ? unescape(cookie[2]) : null);
>   },
>   erase: function(name) {
>     var cookie = Cookie.get(name) || true;
>     Cookie.set(name, '', -1);
>     return cookie;
>   },
>   accept: function() {
>     if (typeof (navigator.cookieEnabled) == 'boolean') {
>       return navigator.cookieEnabled;
>     }
>     Cookie.set('_test', '1');
>     return (Cookie.erase('_test') = '1'); // Line 1807
>   }
> };


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list