-
-
Save leesei/2eff3a6d899f76dbf2e6 to your computer and use it in GitHub Desktop.
hexo #1788
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==================== fix ==================== | |
config.root = "/"; | |
url_for("#") ==> "#" | |
url_for("#top") ==> "#top" | |
url_for("http://www.google.com") ==> "http://www.google.com" | |
url_for("https://www.google.com") ==> "https://www.google.com" | |
url_for("//www.google.com") ==> "//www.google.com" | |
url_for("/archives") ==> "/archives" | |
url_for(" /archives ") ==> "/archives" | |
url_for("2016/03/01") ==> "/2016/03/01" | |
url_for("2016/03/01/index.html") ==> "/2016/03/01/index.html" | |
url_for("./x/y/z/index.html") ==> "/./x/y/z/index.html" | |
url_for("../x/y/z/index.html") ==> "/../x/y/z/index.html" | |
url_for("../../x/y/z/index.html") ==> "/../../x/y/z/index.html" | |
config.root = "/a/b/c"; | |
url_for("#") ==> "#" | |
url_for("#top") ==> "#top" | |
url_for("http://www.google.com") ==> "http://www.google.com" | |
url_for("https://www.google.com") ==> "https://www.google.com" | |
url_for("//www.google.com") ==> "//www.google.com" | |
url_for("/archives") ==> "/archives" | |
url_for(" /archives ") ==> "/archives" | |
url_for("2016/03/01") ==> "/a/b/c/2016/03/01" | |
url_for("2016/03/01/index.html") ==> "/a/b/c/2016/03/01/index.html" | |
url_for("./x/y/z/index.html") ==> "/a/b/c/./x/y/z/index.html" | |
url_for("../x/y/z/index.html") ==> "/a/b/c/../x/y/z/index.html" | |
url_for("../../x/y/z/index.html") ==> "/a/b/c/../../x/y/z/index.html" | |
config.root = "/a/b/c/"; | |
url_for("#") ==> "#" | |
url_for("#top") ==> "#top" | |
url_for("http://www.google.com") ==> "http://www.google.com" | |
url_for("https://www.google.com") ==> "https://www.google.com" | |
url_for("//www.google.com") ==> "//www.google.com" | |
url_for("/archives") ==> "/archives" | |
url_for(" /archives ") ==> "/archives" | |
url_for("2016/03/01") ==> "/a/b/c/2016/03/01" | |
url_for("2016/03/01/index.html") ==> "/a/b/c/2016/03/01/index.html" | |
url_for("./x/y/z/index.html") ==> "/a/b/c/./x/y/z/index.html" | |
url_for("../x/y/z/index.html") ==> "/a/b/c/../x/y/z/index.html" | |
url_for("../../x/y/z/index.html") ==> "/a/b/c/../../x/y/z/index.html" | |
config.root = null; | |
url_for("#") ==> "#" | |
url_for("#top") ==> "#top" | |
url_for("http://www.google.com") ==> "http://www.google.com" | |
url_for("https://www.google.com") ==> "https://www.google.com" | |
url_for("//www.google.com") ==> "//www.google.com" | |
url_for("/archives") ==> "/archives" | |
url_for(" /archives ") ==> "/archives" | |
url_for("2016/03/01") ==> "/2016/03/01" | |
url_for("2016/03/01/index.html") ==> "/2016/03/01/index.html" | |
url_for("./x/y/z/index.html") ==> "/./x/y/z/index.html" | |
url_for("../x/y/z/index.html") ==> "/../x/y/z/index.html" | |
url_for("../../x/y/z/index.html") ==> "/../../x/y/z/index.html" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==================== 3.2.0 ==================== | |
config.root = "/"; | |
url_for("#") ==> "#" | |
url_for("#top") ==> "#top" | |
url_for("http://www.google.com") ==> "http://www.google.com" | |
url_for("https://www.google.com") ==> "https://www.google.com" | |
url_for("//www.google.com") ==> "//www.google.com" | |
url_for("/archives") ==> "/archives" | |
url_for(" /archives ") ==> "/ /archives " | |
url_for("2016/03/01") ==> "/2016/03/01" | |
url_for("2016/03/01/index.html") ==> "/2016/03/01/index.html" | |
url_for("./x/y/z/index.html") ==> "/./x/y/z/index.html" | |
url_for("../x/y/z/index.html") ==> "/../x/y/z/index.html" | |
url_for("../../x/y/z/index.html") ==> "/../../x/y/z/index.html" | |
config.root = "/a/b/c"; | |
url_for("#") ==> "#" | |
url_for("#top") ==> "#top" | |
url_for("http://www.google.com") ==> "http://www.google.com" | |
url_for("https://www.google.com") ==> "https://www.google.com" | |
url_for("//www.google.com") ==> "//www.google.com" | |
url_for("/archives") ==> "/a/b/c/archives" | |
url_for(" /archives ") ==> "/a/b/c /archives " | |
url_for("2016/03/01") ==> "/a/b/c2016/03/01" | |
url_for("2016/03/01/index.html") ==> "/a/b/c2016/03/01/index.html" | |
url_for("./x/y/z/index.html") ==> "/a/b/c./x/y/z/index.html" | |
url_for("../x/y/z/index.html") ==> "/a/b/c../x/y/z/index.html" | |
url_for("../../x/y/z/index.html") ==> "/a/b/c../../x/y/z/index.html" | |
config.root = "/a/b/c/"; | |
url_for("#") ==> "#" | |
url_for("#top") ==> "#top" | |
url_for("http://www.google.com") ==> "http://www.google.com" | |
url_for("https://www.google.com") ==> "https://www.google.com" | |
url_for("//www.google.com") ==> "//www.google.com" | |
url_for("/archives") ==> "/a/b/c/archives" | |
url_for(" /archives ") ==> "/a/b/c/ /archives " | |
url_for("2016/03/01") ==> "/a/b/c/2016/03/01" | |
url_for("2016/03/01/index.html") ==> "/a/b/c/2016/03/01/index.html" | |
url_for("./x/y/z/index.html") ==> "/a/b/c/./x/y/z/index.html" | |
url_for("../x/y/z/index.html") ==> "/a/b/c/../x/y/z/index.html" | |
url_for("../../x/y/z/index.html") ==> "/a/b/c/../../x/y/z/index.html" | |
config.root = null; | |
url_for("#") ==> "#" | |
url_for("#top") ==> "#top" | |
url_for("http://www.google.com") ==> "http://www.google.com" | |
url_for("https://www.google.com") ==> "https://www.google.com" | |
url_for("//www.google.com") ==> "//www.google.com" | |
url_for("/archives") ==> "null/archives" | |
url_for(" /archives ") ==> "null /archives " | |
url_for("2016/03/01") ==> "null2016/03/01" | |
url_for("2016/03/01/index.html") ==> "null2016/03/01/index.html" | |
url_for("./x/y/z/index.html") ==> "null./x/y/z/index.html" | |
url_for("../x/y/z/index.html") ==> "null../x/y/z/index.html" | |
url_for("../../x/y/z/index.html") ==> "null../../x/y/z/index.html" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment