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

fix #118 by escaping smo content #119

Merged
merged 1 commit into from
Apr 30, 2014
Merged

Conversation

calfzhou
Copy link
Contributor

fix #118

@7rack
Copy link

7rack commented Apr 26, 2014

@calfzhou it's work correctly now

<meta property="og:description" content="{{article.summary|striptags}}" />
<meta property="og:site_name" content="{{ SITENAME|striptags }}" />
<meta property="og:description" content="{{article.summary|striptags|e}}" />
<meta property="og:site_name" content="{{ SITENAME|striptags|e }}" />
Copy link
Member

Choose a reason for hiding this comment

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

@calfzhou why do we need to escape SITENAME?

The issue is with article summary, when it is auto generated. title is also understandable, user may put quotes and other stuff in it.

But why SITENAME, shouldn't it be the responsibility of user to make sure he escapes the variable properly?

I tried putting stuff like & and double quotes in SITENAME. The |e directive didn't work.

I suggest we escape title and summary everywhere it is used but keep SITENAME out of it.

Let me know what you think.

Copy link
Member

Choose a reason for hiding this comment

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

I take back my comment. Further testing shows a scenario where escaping SITENAME is useful. I have merged the PR. Thank you for your contribution.

I am making similar change in rest of the code. Not escaping properly was messing up few more subtle things.

@talha131 talha131 merged commit fe1d044 into Pelican-Elegant:master Apr 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants