Skip to content

Instantly share code, notes, and snippets.

@ito4303
Last active March 22, 2018 01:40
Show Gist options
  • Save ito4303/e0ff14b0616a4df76ce56951ba8c78d6 to your computer and use it in GitHub Desktop.
Save ito4303/e0ff14b0616a4df76ce56951ba8c78d6 to your computer and use it in GitHub Desktop.
A script for CotEditor to escape HTML 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