Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
the code that powers reddit.com
branch: master

Rewrite markdown validation for safety and log-friendliness

* Large chunks of code related to (X)HTML validation have been moved to
  `r2.lib.souptest`
* Moved from a SAX-based validator to iterating over every node in
  the document fragment. This was done for performance reasons, and
  because lxml doesn't expose comments via its SAX interface unless
  you use Python 3
* We now raise a descriptive exception if we didn't recognize an entity,
  and return a 400 in the validator rather than raising the exception
  up the chain
* Fixed a few filter bypasses: using CDATA sections, conditional
  comments, and processing instructions.
* Added unit tests to ensure future souptest changes don't introduce
  security issues

This goes hand-in-hand with reddit/snudown#61
to reduce the number of spurious `SyntaxError`s that end up in the
applogs.
latest commit 9e09ac70da
Jordan Milne JordanMilne authored

README.md

reddit

Greetings!

This is the primary codebase that powers reddit.com.

For notices about major changes and general discussion of reddit development, subscribe to the /r/redditdev and /r/changelog subreddits.

You can also chat with us via IRC in #reddit-dev on FreeNode.


Quickstart

To set up your own instance of reddit to develop with, we have a handy install script for Ubuntu that will automatically install and configure most of the stack.

Alternatively, refer to our Install Guide for instructions on setting up reddit from scratch. Many frequently asked questions regarding local reddit installs are covered in our FAQ.

APIs

To learn more about reddit's API, check out our automated API documentation and the API wiki page. Please use a unique User-Agent string and take care to abide by our API rules.

Happy hacking!

Issues and Contribution Guidelines

Thanks for wanting to help make reddit better! First things first, though: github issues is only for confirmed, active bugs. Please submit ideas to /r/ideasfortheadmins.

Please read more on contributions in CONTRIBUTING.md.

Something went wrong with that request. Please try again.