Skip to content

Encode more HTML entites #3

wants to merge 1 commit into from

6 participants

guns commented Jan 23, 2011


I wanted to use unimpaired as a full replacement for my own crappy HTML encode/decode plugin, so I added a foreach loop that encodes all entities available in g:unimpaired_html_entities. Now it's everything I ever wanted! (in a html entity encoder)

I suspect that you left out this functionality for a reason, so I don't expect you to merge it. Just putting it out there :)


tpope commented Jan 23, 2011

Yeah, this definitely doesn't belong on the XML encoding mapping (these entities don't work in XML), but I do think it would be useful on another mapping. [X is the most obvious choice, but I'm also considering that for other options as well (such as a mode that includes XML's ').

I'll make a decision before the next release.

guns commented Jan 23, 2011

Ah, that makes sense. I knew it wasn't an oversight :)

devth commented May 31, 2011

+1 for another mapping

@tpope tpope reopened this Aug 5, 2011

+1 for another mapping

tpope commented Mar 13, 2013

Let's start by making a list of possible variants.

For encoding:

  1. Encode only the common subset (current behavior).
  2. Encode all HTML entities.
  3. Encode all XML entities (just ' is missing).
  4. Both?
  5. Some combination of the above, plus anything outside of ASCII as hex or decimal entities.

As you can see, there aren't really enough letters to go around, which is why I've been hesitant to approach this.

For decoding:

  1. Strip all XML/HTML tags, leaving just plain text (current behavior).
  2. Leave all XML/HTML in place.

Anything else?


+1 for another mapping

vizcay commented Nov 17, 2014

+1 another mapping

tpope commented Nov 19, 2014

Stick it on [X I guess, and make a pull request. Zero demand for any of the other possibilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.