Skip to content

Commit

Permalink
Escape section symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jul 29, 2015
1 parent c54711a commit 9da6bc7
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public EscapeTags() {
// " = &quo
// ! = &exc
// / = &fs
// § = &ss
//
// Also, you can input a non-breaking space via &sp
//
Expand All @@ -63,7 +64,8 @@ public static String Escape(String input) {
.replace(":", "&co").replace("@", "&at")
.replace(".", "&dot").replace("\\", "&bs")
.replace("'", "&sq").replace("\"", "&quo")
.replace("!", "&exc").replace("/", "&fs");
.replace("!", "&exc").replace("/", "&fs")
.replace("§", "&ss");
}

/**
Expand All @@ -85,7 +87,8 @@ public static String unEscape(String input) {
.replace("&co", ":").replace("&at", "@")
.replace("&dot", ".").replace("&bs", "\\")
.replace("&quo", "\"").replace("&exc", "!")
.replace("&fs", "/").replace("&amp", "&");
.replace("&fs", "/").replace("&ss", "§")
.replace("&amp", "&");
}

@TagManager.TagEvents
Expand Down

0 comments on commit 9da6bc7

Please sign in to comment.