changeset 114:73434c2db108

soft-deprecate validate_css method
author Jeff Hammel <k0scist@gmail.com>
date Tue, 03 Nov 2020 14:11:51 -0800
parents 8f30c2f702bc
children 6e7544e256b6
files bitsyblog/utils.py
diffstat 1 files changed, 3 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/bitsyblog/utils.py	Tue Nov 03 14:07:56 2020 -0800
+++ b/bitsyblog/utils.py	Tue Nov 03 14:11:51 2020 -0800
@@ -3,8 +3,6 @@
 import cgi
 import datetime
 import os
-import urllib
-import urllib2
 
 import docutils
 import docutils.core
@@ -33,12 +31,9 @@
 
 
 def validate_css(css):
-    """use a webservice to determine if the argument is valid css"""
-    url = 'http://jigsaw.w3.org/css-validator/validator?text=%s'
-    url = url % urllib.quote_plus(css)
-    foo = urllib2.urlopen(url)
-    text = foo.read()
-    return not 'We found the following errors' in text # XXX hacky
+    # DEPRECATED!  Just return `True` for now
+    return True
+
 
 def date(datestamp):
     datestamp = os.path.split(datestamp)[-1]