Last active
March 22, 2018 01:40
-
-
Save ito4303/e0ff14b0616a4df76ce56951ba8c78d6 to your computer and use it in GitHub Desktop.
A script for CotEditor to escape HTML characters
This file contains 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
#!/usr/bin/env ruby -Ku | |
#%%%{CotEditorXInput=AllText}%%% | |
#%%%{CotEditorXOutput=ReplaceAllText}%%% | |
require 'cgi' | |
while $stdin.gets | |
print CGI.escapeHTML($_) | |
end | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment