From 75eeb4cef767582f05ad32d7574895f361056beb Mon Sep 17 00:00:00 2001 From: Joseph Reagle Date: Wed, 23 Jan 2013 11:49:36 -0500 Subject: [PATCH] remove bom feature from css branch --- pelican/utils.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pelican/utils.py b/pelican/utils.py index ec0baf08..cfbc3c23 100644 --- a/pelican/utils.py +++ b/pelican/utils.py @@ -14,7 +14,7 @@ import fnmatch from collections import defaultdict, Hashable from functools import partial -from codecs import open, BOM_UTF8 +from codecs import open from datetime import datetime from itertools import groupby from jinja2 import Markup @@ -184,12 +184,11 @@ def get_date(string): pass raise ValueError("'%s' is not a valid date" % string) -def pelican_open(filename): + +def pelican_open(path): """Open a file and return it's content""" - content = open(filename, encoding='utf-8').read() - if content[0] == BOM_UTF8.decode('utf8'): - content = content[1:] - return content + return open(path, encoding='utf-8').read() + def slugify(value): """