Chromium Code Reviews| Index: lib/web/web.dart |
| diff --git a/lib/web/web.dart b/lib/web/web.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..47bbd05f8b11f7b11bf39061f949a3ab36bb2eee |
| --- /dev/null |
| +++ b/lib/web/web.dart |
| @@ -0,0 +1,14 @@ |
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE file. |
| + |
| +#library("web"); |
|
kasperl
2012/06/18 07:10:24
You should make sure to add documentation to these
|
| + |
| +String htmlEscape(String text) { |
| + // TODO(efortuna): A more efficient implementation. |
| + return text.replaceAll("&", "&") |
| + .replaceAll("<", "<") |
| + .replaceAll(">", ">") |
| + .replaceAll('"', """) |
| + .replaceAll("'", "'"); |
| +} |