Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add xml:base attribute to the feed tag #43

Merged
merged 5 commits into from
May 21, 2015
Merged

Add xml:base attribute to the feed tag #43

merged 5 commits into from
May 21, 2015

Conversation

benbalter
Copy link
Contributor

Per @pathawks over in #36 (comment), and per the Atom spec:

Any element defined by this specification MAY have an xml:base
attribute [W3C.REC-xmlbase-20010627]. When xml:base is used in an
Atom Document, it serves the function described in section 5.1.1 of
[RFC3986], establishing the base URI (or IRI) for resolving any
relative references found within the effective scope of the xml:base
attribute.

I believe this fixes #22.

/cc @holman and @bkeepers, as this should finally fix the question that started this all

@benbalter benbalter self-assigned this May 21, 2015
@benbalter benbalter added this to the 0.1.0 milestone May 21, 2015
@pathawks
Copy link
Member

We might need to add it per post, if a post contains relative links.

@benbalter
Copy link
Contributor Author

We might need to add it per post, if a post contains relative links.

Done via d863e8a. Good call.

@@ -33,7 +33,9 @@
<updated>{{ post.date | date_to_xmlschema }}</updated>

<id>{{ post.id | prepend: url_base | xml_escape }}</id>
<content type="html">{{ post.content | markdownify | xml_escape }}</content>
<content type="html" xml:base="{{ url_base | xml_escape }}">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be post.url rather than just url_base, since that is what links would be relative to.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once again, you're absolutely right.

@pathawks
Copy link
Member

👍

benbalter added a commit that referenced this pull request May 21, 2015
Add xml:base attribute to the feed tag
@benbalter benbalter merged commit 1bfd98f into master May 21, 2015
@benbalter benbalter deleted the xml-base branch May 21, 2015 22:20
@benbalter
Copy link
Contributor Author

It works!

@pathawks
Copy link
Member

🎉

@pathawks pathawks mentioned this pull request May 23, 2015
@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace URLs with full URLs in post.content
3 participants