Created
May 1, 2013 18:44
-
-
Save akr4/5497337 to your computer and use it in GitHub Desktop.
HTML escape & unescape
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun unhtml (start end) | |
(interactive "r") | |
(save-excursion | |
(save-restriction | |
(replace-string "&" "&" nil start end) | |
(replace-string "<" "<" nil start end) | |
(replace-string ">" ">" nil start end)))) | |
(defun html (start end) | |
(interactive "r") | |
(save-excursion | |
(save-restriction | |
(replace-string "<" "<" nil start end) | |
(replace-string ">" ">" nil start end) | |
(replace-string "&" "&" nil start end)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment