🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #50287

Re: <a> escaping malformed URI reference

#50287
From: porneL
Date: Tue, 28 Sep 2010 15:42
30 lines
1680 bytes
On Fri, 17 Sep 2010 14:56:19 +0100, <jivanmuktaWYTNIJTO@poczta.onet.pl>  
wrote:

> Na następującym znaczniku:
>
> <a href="javascript:show_calendar('document.announcement.valid_from',
> document.announcement.valid_from.value, 'images');">
>
> mam ostrzeżenie:
>
> <a> escaping malformed URI reference
>
> Funkcja show_calendar(str_target, str_datetime, str_images) istnieje w  
> pliku
> ts_picker.js:
>
> <script type="text/javascript" src="include/ts_picker.js">
>
> Nie wiem co jest źle. Dopiero się uczę.

Dokładnym źródłem błędu jest spacja. URI nie wolno zawierać spacji (bez  
kodowania urlencode).

A bardziej ogólnie, to przyczyną problemu jest zapewne jakiś paskudnie  
przestarzały kurs albo mizerna książka, których używasz. href=javascript:  
i document.nazwaformularza to są złe praktyki.

-- 
http://pornel.net
this.author = new Geek("porneL");
Technical Details
Message-ID: <op.vjq1wec0utk0y1@aimac.local>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
References: <7d75.00000302.4c937383@newsgate.onet.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: porneL <niusy4@pornel.net>
Newsgroups: pl.comp.lang.javascript
Subject: Re: <a> escaping malformed URI reference
Date: Tue, 28 Sep 2010 16:42:04 +0100
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 30
Message-ID: <op.vjq1wec0utk0y1@aimac.local>
References: <7d75.00000302.4c937383@newsgate.onet.pl>
NNTP-Posting-Host: 96.95.187.81.in-addr.arpa
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1285688525 18005 81.187.95.96 (28 Sep 2010 15:42:05 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Tue, 28 Sep 2010 15:42:05 +0000 (UTC)
X-User: pornelspam
User-Agent: Opera Mail/10.70 (MacIntel)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit