My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads

Smart Quotes converts straight ASCII quotes in HTML content to their typographically-correct equivalents.

For example, it converts

"She's a ripper, mate!"

into

“She’s a ripper, mate!”

It is an easy-to-use Java library with no dependencies other than Java 1.5 or higher. To correct quotes in your application which produces HTML, you can simply drop the JAR into your classpath and use it this way:

SmartQuotes smartQuotes = new SmartQuotes();
String educated = smartQuotes.educate("...");

Downloads

Binaries

Version Date Download
1.0 25 April 2009 smartquotes-1.0.jar

Source code

Source code details are available on the Source tab.

Related projects

The Smart Quotes Confluence plugin uses this library to render smart quotes in the Confluence wiki.

Author

Matt Ryall
smartquotes@mattryall.net
http://www.mattryall.net

Credits

John Gruber's SmartyPants was the inspiration for this project and provided a lot of guidance with the algorithm and regular expressions.

Powered by Google Project Hosting