[javascriptlint-commit] SF.net SVN: javascriptlint:[268] trunk
Status: Beta
Brought to you by:
matthiasmiller
|
From: <mat...@us...> - 2009-10-07 19:39:31
|
Revision: 268
http://javascriptlint.svn.sourceforge.net/javascriptlint/?rev=268&view=rev
Author: matthiasmiller
Date: 2009-10-07 19:39:23 +0000 (Wed, 07 Oct 2009)
Log Message:
-----------
www: disallow changing directory with inclusions, since links get confusing
Modified Paths:
--------------
trunk/www/__template__
trunk/www/rss.php
trunk/www.py
Added Paths:
-----------
trunk/www/news/index.rss
Removed Paths:
-------------
trunk/www/news.rss
Modified: trunk/www/__template__
===================================================================
--- trunk/www/__template__ 2009-10-07 19:32:04 UTC (rev 267)
+++ trunk/www/__template__ 2009-10-07 19:39:23 UTC (rev 268)
@@ -10,7 +10,7 @@
<div id="nav">
%(nav)s
- <p align="center"><br/><a href="/news.rss">
+ <p align="center"><br/><a href="/news/index.rss">
<img border="0" src="/static/feed-icon-32x32.png" width="32" height="32"></a></p>
<p align="center"><br/><a href="http://sourceforge.net/projects/javascriptlint">
Copied: trunk/www/news/index.rss (from rev 267, trunk/www/news.rss)
===================================================================
--- trunk/www/news/index.rss (rev 0)
+++ trunk/www/news/index.rss 2009-10-07 19:39:23 UTC (rev 268)
@@ -0,0 +1,8 @@
+<!--
+@output=rss
+@title=JavaScript Lint Project News
+@link=http://www.javascriptlint.com/
+@desc=JavaScript Lint Project News
+-->
+
+<!--@include index.htm-->
Property changes on: trunk/www/news/index.rss
___________________________________________________________________
Added: svn:mergeinfo
+
Added: svn:eol-style
+ native
Deleted: trunk/www/news.rss
===================================================================
--- trunk/www/news.rss 2009-10-07 19:32:04 UTC (rev 267)
+++ trunk/www/news.rss 2009-10-07 19:39:23 UTC (rev 268)
@@ -1,8 +0,0 @@
-<!--
-@output=rss
-@title=JavaScript Lint Project News
-@link=http://www.javascriptlint.com/
-@desc=JavaScript Lint Project News
--->
-
-<!--@include /news/-->
Modified: trunk/www/rss.php
===================================================================
--- trunk/www/rss.php 2009-10-07 19:32:04 UTC (rev 267)
+++ trunk/www/rss.php 2009-10-07 19:39:23 UTC (rev 268)
@@ -1,3 +1,3 @@
<?php
-// Header('Location: /news.rss');
+// Header('Location: /news/index.rss');
?>
Modified: trunk/www.py
===================================================================
--- trunk/www.py 2009-10-07 19:32:04 UTC (rev 267)
+++ trunk/www.py 2009-10-07 19:39:23 UTC (rev 268)
@@ -128,7 +128,7 @@
channel.appendChild(item)
item.appendChild(doc.createElement("link", href))
item.appendChild(doc.createElement("title", heading))
- item.appendChild(doc.createElement("guid", guid))
+ item.appendChild(doc.createElement("guid", href))
item_desc = None
elif child.nodeName in ["p", "ul", "blockquote"] :
@@ -159,9 +159,15 @@
def _preprocess(path):
def _include(match):
+ # Disallow changing directories because of how links, etc
+ # will resolve.
+ url = match.group(1).strip()
+ if '/' in url:
+ raise ValueError, 'Inclusions cannot cross directories'
+
# When including a file, update global settings and replace
# with contents.
- includepath = _resolve_url(match.group(1).strip(), path)
+ includepath = _resolve_url(url, path)
if not includepath:
raise ValueError, 'Unmatched URL: %s' % match.group(1)
settings, contents = _preprocess(includepath)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|