Button Button
Scripts (000001)
XSSFilter could not parse (X)HTML:


<p>From sputnik-list-bounces@lists.luaforge.net Fri Jan  9 23:29:14 2009
Received: from pop.gmail.com (el-in-f109.google.com [209.85.163.109])</p>
<pre><code>by chai (mpop-1.0.11) with POP3
for <yuri>; Fri, 09 Jan 2009 21:29:14 -0200
</code></pre>
<p>Delivered-To: sputnik.list.archiver@gmail.com
Received: by 10.142.242.18 with SMTP id p18cs944679wfh;</p>
<pre><code>    Tue, 6 Jan 2009 05:17:37 -0800 (PST)
</code></pre>
<p>Received: by 10.100.164.20 with SMTP id m20mr11624552ane.97.1231247856963;</p>
<pre><code>    Tue, 06 Jan 2009 05:17:36 -0800 (PST)
</code></pre>
<p>Return-Path: <a href="mailto:sputnik-list-bounces@lists.luaforge.net">sputnik-list-bounces@lists.luaforge.net</a>
Received: from mail.luaforge.net (www.luaforge.net [147.65.1.201])</p>
<pre><code>    by mx.google.com with ESMTP id b14si38129282ana.12.2009.01.06.05.17.26;
    Tue, 06 Jan 2009 05:17:36 -0800 (PST)
</code></pre>
<p>Received-SPF: pass (google.com: domain of sputnik-list-bounces@lists.luaforge.net designates 147.65.1.201 as permitted sender) client-ip=147.65.1.201;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of sputnik-list-bounces@lists.luaforge.net designates 147.65.1.201 as permitted sender) smtp.mail=sputnik-list-bounces@lists.luaforge.net; dkim=neutral (body hash did not verify) header.i=@gmail.com
Received: from localhost ([127.0.0.1] helo=localhost.localdomain)</p>
<pre><code>by mail.luaforge.net with esmtp (Exim 4.50)
id 1LKDdb-0006K8-GS; Tue, 06 Jan 2009 13:14:35 -0200
</code></pre>
<p>Received: from po-out-1718.google.com ([72.14.252.158])</p>
<pre><code>by mail.luaforge.net with esmtp (Exim 4.50) id 1LKDda-0006K3-82
for sputnik-list@lists.luaforge.net; Tue, 06 Jan 2009 13:14:34 -0200
</code></pre>
<p>Received: by po-out-1718.google.com with SMTP id c31so16999184poi.0</p>
<pre><code>for <sputnik-list@lists.luaforge.net>;
Tue, 06 Jan 2009 05:17:01 -0800 (PST)
</code></pre>
<p>DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;</p>
<pre><code>h=domainkey-signature:received:received:message-id:date:from:sender
:to:subject:in-reply-to:mime-version:content-type
:content-transfer-encoding:content-disposition:references
:x-google-sender-auth;
bh=PTLVns1sdHBfAm3Cn1S5Kbv4l+h7b57euq/EM1+Y35M=;
b=GEb8Pjy+LaRFY/c+JJTRARHEjJjVmbd45xMzeDMHVFfIURGvlfqbLy3GQmGSGaxfdA
EPRH5thaNc+56MUFIyESu9UrpH0OJ+tagVbT10U2N0fJSk5dX53TonVDVIG2YXUOhIXq
mHFZXR4IVu2Q7fF8OGxMXUH8JDoXG0uPgm/is=
</code></pre>
<p>DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;</p>
<pre><code>h=message-id:date:from:sender:to:subject:in-reply-to:mime-version
:content-type:content-transfer-encoding:content-disposition
:references:x-google-sender-auth;
b=EQrXOv/mS0tfRB1lakPM0gzFsWSBRQ1k9PtohGIJtvsVorfTUA66M4TH2IHMqUe3Z5
JehNWfELT7uPryb9tYNybkA1vPtrRph7nyQc3w7dR410Qak2bYhOrubGhXvT2bf+Hn3L
NQjO3R5xvAp3g/6rRV4H2ZmogmJ+6gLwWwx6I=
</code></pre>
<p>Received: by 10.140.193.15 with SMTP id q15mr10924252rvf.274.1231247818347;</p>
<pre><code>Tue, 06 Jan 2009 05:16:58 -0800 (PST)
</code></pre>
<p>Received: by 10.140.177.20 with HTTP; Tue, 6 Jan 2009 05:16:58 -0800 (PST)
Message-ID: <a href="mailto:fa4efbc00901060516i2a70671n8013d119932cb74e@mail.gmail.com">fa4efbc00901060516i2a70671n8013d119932cb74e@mail.gmail.com</a>
Date: Tue, 6 Jan 2009 11:16:58 -0200
From: "Yuri Takhteyev" <a href="mailto:yuri@sims.berkeley.edu">yuri@sims.berkeley.edu</a>
To: Sputnik <a href="mailto:sputnik-list@lists.luaforge.net">sputnik-list@lists.luaforge.net</a>
In-Reply-To: <a href="mailto:d3b6d880901060408k7742b2a0kfce556aefdaf755d@mail.gmail.com">d3b6d880901060408k7742b2a0kfce556aefdaf755d@mail.gmail.com</a>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <a href="mailto:d3b6d880901060408k7742b2a0kfce556aefdaf755d@mail.gmail.com">d3b6d880901060408k7742b2a0kfce556aefdaf755d@mail.gmail.com</a>
X-Google-Sender-Auth: 3504a1101b14f1d9
Subject: [Sputnik-list] Re: Scripts
X-BeenThere: sputnik-list@lists.luaforge.net
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "An all-purpose list for now." <sputnik-list.lists.luaforge.net>
List-Unsubscribe: <a href="http://lists.luaforge.net/cgi-bin/mailman/listinfo/sputnik-list">http://lists.luaforge.net/cgi-bin/mailman/listinfo/sputnik-list</a>,</p>
<pre><code><mailto:sputnik-list-request@lists.luaforge.net?subject=unsubscribe>
</code></pre>
<p>List-Archive: <a href="http://lists.luaforge.net/pipermail/sputnik-list">http://lists.luaforge.net/pipermail/sputnik-list</a>
List-Post: <a href="mailto:sputnik-list@lists.luaforge.net">sputnik-list@lists.luaforge.net</a>
List-Help: <a href="mailto:sputnik-list-request@lists.luaforge.net?subject=help">sputnik-list-request@lists.luaforge.net?subject=help</a>
List-Subscribe: <a href="http://lists.luaforge.net/cgi-bin/mailman/listinfo/sputnik-list">http://lists.luaforge.net/cgi-bin/mailman/listinfo/sputnik-list</a>,</p>
<pre><code><mailto:sputnik-list-request@lists.luaforge.net?subject=subscribe>
</code></pre>
<p>Sender: sputnik-list-bounces@lists.luaforge.net
Errors-To: sputnik-list-bounces@lists.luaforge.net</p>

<p>(The question was asked off the list but I am replying to the list
since this might be of interest to others.)</p>

<blockquote>
    <p>   Is there a way to allow some specific scripts to run in Sputnik ?
       I would like to include something like:</p>
    
    <p><script language="JavaScript"
    src="http://www.gvisit.com/record.php?sid=..."
    type="text/javascript"></script></p>
</blockquote>

<p>Yes, though in the current version you would need to dive into code
for this, since I looks like I forgot to add a config parameter for
this.</p>

<p>Go to ~/sputnik/rocks/sputnik/8.08.13-0/lua/sputnik/markup/markdown.lua
and add the following line after 'filter.allowed<em>tags.a.css</em>class =
"."':</p>

<p>filter.allowed_tags.script = {</p>
<pre><code>src="^http://www%.gvisit%.com/",
language="JavaScript",
["type"]="text%/javascript"
</code></pre>
<p>}</p>

<p>This will allow "script" tag, but will include its attributes only if
they match the specified patterns. In particular, it will only include
the src attribute if it matches the pattern
"^http://www%.gvisit%.com/".
You can specify multiple patterns my setting the value of the
attribute to a table rather than a string:</p>

<p>filter.allowed_tags.script = {</p>
<pre><code>src={"^http://example%.com", "^http://www%.gvisit%.com/"},
language="JavaScript",
["type"]="text%/javascript"
</code></pre>
<p>}</p>

<p>I think I will add a node field for this in Fenchurch, but it will use
the same format. That is, you would login as root and go edit the
"xssfilter<em>allowed</em>tags" field, adding something like this to it:</p>

<p>script = {</p>
<pre><code>src={"^http://example%.com", "^http://www%.gvisit%.com/"},
</code></pre>
<p>}</p>

<p>This would make it possible to allow/disallow tags for all nodes, all
nodes of a particular type, or only specific nodes.</p>

<ul>
    <li>yuri</li>
</ul>

<p>-- 
http://sputnik.freewisdom.org/</p>

<hr/>
<p>Sputnik-list mailing list
Sputnik-list@lists.luaforge.net
http://lists.luaforge.net/cgi-bin/mailman/listinfo/sputnik-list</p>