I gotta get some of these jeans.
Despite articles such as “Preparing your feeds for IE7″, there are still unforseen problems getting IE7 to handle Atom or RSS feeds. Before getting into these problems, I want to point out two incredibly useful tools for testing IE7 when you don’t have access to Windows. browsershots.org lets you get a screenshot of IE7 or most any browser for free, although there is a 30 minute delay. For professionals who need to test rendering in many different browsers, browsercam.com is definitely valuable. However, if you just need to test IE7 without a 30 minute delay like browsershots.org, then running Windows under VMWare would be more economical than a year’s subscription to browsercam.com.
Problem #1: IE7 is cranky about <style> tags in the <body>
It is against standards to put a <style> tag in the <body> of your document, but IE7 doesn’t support the <head> tag in an Atom/RSS feed. It wouldn’t be that bad if it just ignored the css in the <style> tag, but it actually displays it in the page.
Problem #2: Displaying HTML entities in an Atom/RSS feed
Since IE7 won’t process a feed with a DTD, you can’t use HTML entities such as “Â ” in your xhtml because xml only knows about five entities until a DTD defines them. There are three solutions to this problem.
decodedString = unicode(BeautifulSoup(encodedString,convertEntities=BeautifulSoup.HTML_ENTITIES ))
utf8_string = decodedString.encode('utf-8')
decodedString = unicode(BeautifulSoup(encodedString,convertEntities=BeautifulSoup.HTML_ENTITIES ))
ascii_string = decodedString.encode('ascii', 'xmlcharrefreplace')
Even though BeautifulSoup (used above) is intended for HTML, and BeautifulStoneSoup is for XML, BeautifulSoup works better in this situation because you don’t have to worry about this issue with nested tags.
Using a method for a read-only object attribute is very clean in python.
class foo:
@property
def name(self):
return self._name
However, providing a setter method is somewhat ugly. Someone came up with an interesting workaround.
According to this CNET blog, more customers for Alfresco CMS are interested in deploying on Ubuntu than RHEL.
Powered by WordPress