anchor.diff: -// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
  +// Copyright (c) 2013, 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.
   
  
positive.code:  * It returns the escaped URI.
   */
  String encodeUri(String uri) {
    return _uriEncode(
      "-_.!~*'()#;,/?:@&=\$0123456789"
      "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", uri);
  }
  
  /**
  
negative.code: /**
   * This is the internal implementation of JavaScript's encodeURI function.
   * It encodes all characters in the string [text] except for those
   * that appear in [canonicalTable], and returns the escaped string.
   */
  String _uriEncode(List<int> canonicalTable, String text) {
    final String hex = '0123456789ABCDEF';
    var byteToHex = (int v) => '%${hex[v >> 4]}${hex[v & 0x0f]}';
    StringBuffer result = new StringBuffer();
    for (int i = 0; i < text.length; i++) {
      int ch = text.charCodeAt(i);
      if (ch < 128 && ((canonicalTable[ch >> 4] & (1 << (ch & 0x0f))) != 0)) {
        result.add(text[i]);
      } else if (text[i] == " ") {
        result.add("+");
      } else {
        if (ch >= 0xD800 && ch < 0xDC00) {
          // Low surrogate. We expect a next char high surrogate.
          ++i;
  