Browse Source

more docfix

Simon Krajewski 12 years ago
parent
commit
f8ff289b92
1 changed files with 10 additions and 10 deletions
  1. 10 10
      std/StringTools.hx

+ 10 - 10
std/StringTools.hx

@@ -86,14 +86,14 @@ class StringTools {
 
 		The following replacements are made:
 			
-		- & becomes &
-		- < becomes &lt;
-		- > becomes &gt;
+		- `&` becomes `&amp`;
+		- `<` becomes `&lt`;
+		- `>` becomes `&gt`;
 		
 		If `quotes` is true, the following characters are also replaced:
 		
-		- " becomes &quot;
-		- ' becomes &#039;
+		- `"` becomes `&quot`;
+		- `'` becomes `&#039`;
 	**/
 	public static function htmlEscape( s : String, ?quotes : Bool ) : String {
 		s = s.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;");
@@ -108,11 +108,11 @@ class StringTools {
 
 		The replacements follow:
 			
-		- &amp; becomes &
-		- &lt; becomes <
-		- &gt; becomes >
-		- &quot; becomes "
-		- &#039; becomes '
+		- `&amp;` becomes `&`
+		- `&lt;` becomes `<`
+		- `&gt;` becomes `>`
+		- `&quot;` becomes `"`
+		- `&#039;` becomes `'`
 	**/
 	public static function htmlUnescape( s : String ) : String {
 		return s.split("&gt;").join(">").split("&lt;").join("<").split("&quot;").join('"').split("&#039;").join("'").split("&amp;").join("&");