github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

vigetlabs / xhtml-dev

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 10
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

A plugin to serve up pages as 'application/xhtml+xml' in development mode — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

send text/html for all IEs - 7 chokes on xhtml+xml, too 
bscofield (author)
Tue Dec 23 07:39:20 -0800 2008
commit  aca62ee37f7d22e103cd93a01545f5409b14fd45
tree    002074b3c84c7f3d0d534f3224c6a8d473523ce3
parent  abcea24e9669109ca57bbe87c77c354ac5eb78ec
xhtml-dev /
name age
history
message
file MIT-LICENSE Loading commit data...
file README
file Rakefile
file init.rb
directory lib/
directory test/
README
XhtmlDev
========

This plugin makes design and development a little better by tweaking the content type of pages
generated by Rails. In development mode, it'll automatically serve up HTML pages with the content-
type 'application/xhtml+xml' — which means that standards-aware browsers will show an exception page
if you enter invalid XHTML markup.

Of course, IE6 and friends can't handle that MIME type, so the plugin makes sure that they get the 
pages as 'text/html.' Also, to more easily deal with user-generated content in the wild, anything
coming out of the production environment will also be served as 'text/html.'

Example
=======

The only thing you have to do to get this running is add a before filter to your application 
controller:

class ApplicationController < ActionController::Base
  before_filter :handle_with_ie
end

And even that's optional, if you don't care to serve 'text/html' to IE6, et al. in development mode.

Happy hacking!


Copyright (c) 2008 Ben Scofield of Viget Labs, released under the MIT license
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server