changeset 7:145a4d85b37d

exclude long urls for now ::sigh::
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 28 Dec 2010 20:38:08 -0800
parents a88a670c92d0
children 1d16bde33eee
files svgsitemap/middleware.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/svgsitemap/middleware.py	Tue Dec 28 20:27:12 2010 -0800
+++ b/svgsitemap/middleware.py	Tue Dec 28 20:38:08 2010 -0800
@@ -37,6 +37,7 @@
                  'external_referers': True,
                  'maxwidth': 5,
                  'minwidth': '0.01',
+                 'maxlength': 80,
                  'excluded': '*.css *.js */static/* /css/* *.ico /backgrounds/*',
 
                  # input/output
@@ -186,6 +187,9 @@
             for url in urls:
                 if fnmatch(url, pattern):
                     return True
+        for url in urls:
+            if len(url) > self.maxlength:
+                return True
         return False
 
     def set_widths(self):