Alfred Xing
02e53fb6ff
Implement @parkr's suggestions
2014-10-27 22:59:15 -07:00
Alfred Xing
cd9d38c5ea
Remove duplicate code
2014-10-26 21:38:19 -07:00
Alfred Xing
0fe1d0686a
Allow placeholders in permalinks
2014-10-26 18:23:58 -07:00
Parker Moore
ae01b1d5df
😦
2014-10-22 02:16:50 -07:00
Parker Moore
5cb0aee251
Have to go back on all these...
2014-10-22 02:10:21 -07:00
Parker Moore
0511ece2f5
Use String#<< instead of String#+=
...
I just couldn’t believe this but look:
~/jekyll/jekyll#master$ ruby benchmark/string-concat
Calculating -------------------------------------
+= 6367 i/100ms
<< 128697 i/100ms
-------------------------------------------------
+= 1704.3 (±0.6%) i/s - 12734 in 7.472170s
<< 4381212.4 (±6.3%) i/s - 21878490 in 5.014899s
WOW.
2014-10-22 00:58:20 -07:00
Parker Moore
1395d5686b
Optimize more URL#sanitize_url
2014-10-22 00:57:53 -07:00
Parker Moore
3227c4ecea
Use #tr instead of #gsub
2014-10-22 00:57:25 -07:00
Alberto Grespan
7ce849a2b6
Revert changes and add encoding to the test file
...
* Add encoding to the test file as Ruby 1.9.3 doesn’t defaults to utf-8.
* Remove the forced encoding as encode seems too aggressive.
2014-05-20 00:03:40 -04:30
Alberto Grespan
77cef764d6
Force encoding before escaping or unescaping
...
This will reassure not having any errors when escaping or
unescaping.
2014-05-19 18:50:25 -04:30
Alberto Grespan
9932eb667b
Encode URLs in utf-8 when escaping and unescaping
...
There is a problem while returning a path that has some special and possible Non-ASCII characters that may lead jekyll to break while doing the unescaping process. This is can be addressed by “forcing” ASCII to UTF-8.
2014-05-17 17:53:40 -04:30
Parker Moore
75f49a751e
OMG COLLECTIONS ARE RENDERING CALL THE POLICE
2014-04-14 22:46:21 -04:00
nitoyon
c56ce248c9
Move URL escape to Jekyll::URL
2014-03-21 16:59:25 +00:00
nitoyon
eebb6414bf
Fix Post#url escape
...
Post#url was escaped using CGI.escape.
When file name contains a space character, its url points to
non-existing URL.
For example, when we have a post named '2014-01-02-foo bar.md',
we expect its url to be '/2014/01/02/foo%20bar.html',
but it was actually '/2014/01/02/foo+bar.html'.
We now define Jekyll::URL.escape_path and Jekyll::URL.unescape_path,
and use them to escape and unescape Post#url
2014-03-21 16:57:40 +00:00
Ben Balter
323d14845f
rebreak tests, move sanitization closer to write
...
Signed-off-by: Parker Moore <parkrmoore@gmail.com>
2014-01-13 22:21:30 -08:00
Ben Balter
9b3068c15d
url escape before sanitizing
...
Signed-off-by: Parker Moore <parkrmoore@gmail.com>
2014-01-13 22:21:30 -08:00
Lucas Jenss
362fcf28f0
Use do ... end for multiline block
2013-07-31 23:17:56 +02:00
Lucas Jenss
f5d0be9660
Move URL generation to own class instead of a module
...
As suggested by @parkr in #944
2013-07-25 22:44:27 +02:00
Lucas Jenss
2ac98a7358
Merge branch 'master' into permalink-special-characters
...
Conflicts:
lib/jekyll/page.rb
lib/jekyll/post.rb
2013-07-14 23:58:22 +02:00
Lucas Jenss
cfcbe1f830
Refactor URL processing/generation into separate module
...
This is done to prepare for improved permalink generation
for URLs containing special characters, as proposed in
issue #782
2013-04-09 23:53:46 +02:00