hugo/hugolib
Jonathan Anderson e72ce89aaf Move s.prepUrl() before prepending BaseUrl.
When we have an absolute menu url specified in the config file
(e.g., `menu: { main: { name: "News", url: "/news" } }`),
its menu entry is generated by prefixing it with the BaseUrl.
The result is then run through prepUrl(), which uses helpers.Urlize to
convert urls such as 'My First Link' to 'my-first-link'.

The behaviour is backwards: we do not want to run helpers.Urlize on the
BaseUrl, only on the absolute component. Currently, a BaseUrl such as
'http://my.edu/ENG101' will be converted to 'http://my.edu/eng101',
resulting in broken links in all of my menus.

This commit switches the URL prep and BaseUrl prepending actions around. I
would argue that these URLs shouldn't be run through prepUrl anyway
because the site developer has specified them explicitly in a config file
and might be surprised for, e.g., URLs to change case, but that's another
commit for another time.
2015-01-26 01:03:18 +01:00
..
author.go
benchmark_test.go
handler_base.go
handler_file.go
handler_meta.go
handler_page.go Register rstHandler to restore experimental reST support 2015-01-21 06:41:19 -07:00
hugo.go Fix the Hugo.Generator tag so it can be used 2015-01-19 08:26:06 +01:00
media.go
menu.go
menu_test.go Move s.prepUrl() before prepending BaseUrl. 2015-01-26 01:03:18 +01:00
node.go Fix RelPermalink() and Urls in menus vs canonifyUrls 2015-01-23 14:13:00 +01:00
page.go Fix for page.GetParam() for JSON and TOML maps 2015-01-24 15:25:44 +01:00
page_permalink_test.go Fix RelPermalink() and Urls in menus vs canonifyUrls 2015-01-23 14:13:00 +01:00
page_taxonomy_test.go
page_test.go Fix for page.GetParam() for JSON and TOML maps 2015-01-24 15:25:44 +01:00
page_time_integration_test.go
pageGroup.go
pageGroup_test.go
pageSort.go
pagesPrevNext.go
pagesPrevNext_test.go
path_separators_test.go
path_separators_windows_test.go
permalinks.go
permalinks_test.go
planner.go
redis.cn.md
rss_test.go
shortcode.go Protect the innerShortCodeCache by a RW lock 2015-01-21 19:13:11 +01:00
shortcode_test.go Fix issue with nested shortcodes 2015-01-15 12:21:15 +01:00
shortcodeparser.go
shortcodeparser_test.go
site.go Move s.prepUrl() before prepending BaseUrl. 2015-01-26 01:03:18 +01:00
site_show_plan_test.go
site_test.go
site_url_test.go
siteinfo_test.go
sitemap.go
sitemap_test.go
summary.go
taxonomy.go
taxonomy_test.go