From 2979784db9ff65961711e09f7024847a2e050cf4 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Thu, 24 Sep 2020 12:41:14 +0200 Subject: [PATCH 1/5] docs: style feed fix #323 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 35b468e1..83f208ad 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ Jekyll's `smartify` filter uses [kramdown](https://kramdown.gettalong.org/option ### Custom styling -Want to style what your feed looks like in the browser? Simply add an XSLT at `/feed.xslt.xml` and Jekyll Feed will link to the stylesheet. +Want to style what your feed looks like in the browser? When a XSLT Styleheet file named `feed.xslt.xml`exisrs at the root of your repository, a link to this stylesheet is added to the generated feed. ## Why Atom, and not RSS? From c8e7a43d6fa4e34abf90ff1cea00d1b50df6dfb4 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Thu, 24 Sep 2020 12:42:00 +0200 Subject: [PATCH 2/5] docs: typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 83f208ad..3159782b 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ Jekyll's `smartify` filter uses [kramdown](https://kramdown.gettalong.org/option ### Custom styling -Want to style what your feed looks like in the browser? When a XSLT Styleheet file named `feed.xslt.xml`exisrs at the root of your repository, a link to this stylesheet is added to the generated feed. +Want to style what your feed looks like in the browser? When a XSLT Styleheet file named `feed.xslt.xml` exists at the root of your repository, a link to this stylesheet is added to the generated feed. ## Why Atom, and not RSS? From df10ac8dead8b9956a9367eec465f3bfb49446f0 Mon Sep 17 00:00:00 2001 From: Parker Moore <237985+parkr@users.noreply.github.com> Date: Sat, 3 Oct 2020 11:02:04 -0400 Subject: [PATCH 3/5] MetaTag: when encoding for XML special characters, handle non-string objects (#326) Merge pull request 326 --- lib/jekyll-feed/meta-tag.rb | 7 +++++-- spec/jekyll-feed_spec.rb | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/jekyll-feed/meta-tag.rb b/lib/jekyll-feed/meta-tag.rb index 6a47a095..54759297 100644 --- a/lib/jekyll-feed/meta-tag.rb +++ b/lib/jekyll-feed/meta-tag.rb @@ -7,8 +7,11 @@ class MetaTag < Liquid::Tag def render(context) @context = context - attrs = attributes.map { |k, v| %(#{k}=#{v.encode(:xml => :attr)}) }.join(" ") - "" + attrs = attributes.map do |k, v| + v = v.to_s unless v.respond_to?(:encode) + %(#{k}=#{v.encode(:xml => :attr)}) + end + "" end private diff --git a/spec/jekyll-feed_spec.rb b/spec/jekyll-feed_spec.rb index e284dc30..af95ea67 100644 --- a/spec/jekyll-feed_spec.rb +++ b/spec/jekyll-feed_spec.rb @@ -189,6 +189,21 @@ end end + context "with site.title set as a non-string value" do + class MySiteTitle + def to_s + "My Dynamic Site Title <&>" + end + alias_method :to_liquid, :to_s + end + let(:site_title) { MySiteTitle.new } + let(:overrides) { { "title" => site_title } } + + it "ensures the site.title is the string representation of the object" do + expect(feed.title.content).to eql(site_title.to_s.encode(xml: :text)) + end + end + context "with site.name set" do let(:site_name) { "My Site Name" } let(:overrides) { { "name" => site_name } } From 653999c975564e30003d2c0c247d59e5a89eecda Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sat, 3 Oct 2020 11:02:06 -0400 Subject: [PATCH 4/5] Update history to reflect merge of #326 [ci skip] --- History.markdown | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/History.markdown b/History.markdown index 8e51a8a6..64060bdc 100644 --- a/History.markdown +++ b/History.markdown @@ -1,3 +1,9 @@ +## HEAD + +### Development Fixes + + * MetaTag: when encoding for XML special characters, handle non-string objects (#326) + ## 0.15.0 / 2020-07-10 ### Minor Enhancements From 6bc0f83df76dcf28e32ab467ee98caa1719eb4d8 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 4 Oct 2020 13:02:50 -0400 Subject: [PATCH 5/5] Release :gem: v0.15.1 --- History.markdown | 4 +++- lib/jekyll-feed/version.rb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/History.markdown b/History.markdown index 64060bdc..4e39f544 100644 --- a/History.markdown +++ b/History.markdown @@ -1,6 +1,8 @@ ## HEAD -### Development Fixes +## 0.15.1 / 2020-10-04 + +### Bug Fixes * MetaTag: when encoding for XML special characters, handle non-string objects (#326) diff --git a/lib/jekyll-feed/version.rb b/lib/jekyll-feed/version.rb index c89a4917..474050b7 100644 --- a/lib/jekyll-feed/version.rb +++ b/lib/jekyll-feed/version.rb @@ -2,6 +2,6 @@ module Jekyll module Feed - VERSION = "0.15.0" + VERSION = "0.15.1" end end