wymeditor/wymeditor — pull request #416 by FriedRice (2013-07-08 19:07:29+00:00)
Title: Don't override parser functions for browser-specific behavior

webkit and firefox both override the `openBlockTag` function used in the `xhtml-sax-listener`. This makes maintaining that code more confusing, without any real benefit, since the special cases are generally simple. In addition, just because someone is using another browser it doesn't mean we don't want to correct browser-specific quirks that might have been created by someone using another browser.

### Fixing `openBlockTag`

* Move the logic for switching spans with certain styles to their semantic elements in to the normal listener. Maybe write a specific helper method for doing the tag to tag conversion. Could we just make `getTagReplacements` smarter?
* Add a method that strips any classes that match classes from a constant. Use this to strip `apple-style-span`.

Note: In the future, the same logic that's used for switching spans to their proper element can be extended to convert messy pasted-from-word HTML to its clean, semantic equivalent.

### Find other overrides

1. I'm not even sure how setting `WYMeditor.WymClassSafari.prototype.openBlockTag` actually overrides the `openBlockTag` from the listener. If there's something we're doing specifically to enable that, stop doing that.
2. Identify any other sax-listener overrides and either pull them up in this ticket, or create tickets speccing out how they should be pulled up.