The attached context diff contains fixes for the source file wikiPage.php, with these changes:
- Now accepts "JPG", "PNG", etc., in uppercase as image names. No longer accepts "tif" or "tiff"--that's not an appropriate format for web images, so they'll just be rendered as links.
- Removes HTML comments from wiki text before rendering, so they can be used to leave comments _about_ the wiki text.
- Major reworking of the code that handles p/pre/ol/ul/dl. Old code basically ripped out and replaced; now produces clean HTML, compact dls, handles nesting better, etc. I've tested this pretty extensively on my own server without problems, but it is a major change, so you might want to schedule installation for a time when Jimbo or Jason is available to roll it back if I missed something.
Is there a tool that will reformat PHP code the way "indent" does for C code? This code is a real mess in places.
wikitech-l@lists.wikimedia.org