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 a configuration option for whether we add or remove trailing slashes from the URLs #1028

Closed
wants to merge 2 commits into from

Conversation

hugo
Copy link
Contributor

@hugo hugo commented Oct 14, 2013

No description provided.

@gotdibbs
Copy link
Contributor

I can't speak to the intention of requiring them in the first place, but two points on your PR:

  • We prefer just one commit per PR so I would squash them in the future if possible as per the contributing docs.
  • I'm pretty sure a change like this will break the functional tests depending on the setting in config.js. So if this were to get merged, it'd be good to have the functional tests updated accordingly.

@matthojo
Copy link
Contributor

@hugo
Copy link
Contributor Author

hugo commented Oct 14, 2013

I'll review and re-submit. Closing pending that.

@hugo hugo closed this Oct 14, 2013
@ErisDS
Copy link
Member

ErisDS commented Oct 14, 2013

This seems like over configuration and is not something we'd be open to without a clear use case that serves the majority of users. Seems like plugin territory to me.

@ajeeshpu
Copy link

I am not sure if this happens for everyone but the facebook scraper seems to have an issue with a trailing slash. you could try this here with-slash and without-slash . Should individual posts be considered like directories by default? A helper option would be nice

@ErisDS
Copy link
Member

ErisDS commented Jan 11, 2014

@ajeeshpu If you think you have found a bug please raise it as a proper bug according to the contributing guidelines using the bug report template.

As it stands I don't have anywhere near enough information other than to say 'Works for me'.

@ajeeshpu
Copy link

@ErisDS apologies. Will do that

@fubhy
Copy link

fubhy commented Jan 19, 2015

I couldn't find a bug report for this so I opened one at #4828

ErisDS added a commit to ErisDS/Ghost that referenced this pull request Apr 21, 2016
refs TryGhost#2459

This includes updating handlebars to v4 as well as other fixes which
will introduce breaking changes to the theme API:

From express-hbs:
- partials must now use the `.hbs` extension, the same as templates
From handlebars:
- Depthed paths are now conditionally pushed on to the stack.
If the helper uses the same context, then a new stack is not created.
This leads to behavior that better matches expectations for helpers
like if that do not seem to alter the context. Any instances of ../
in templates will need to be checked for the correct behavior under 4.0.0.
In general templates will either reduce the number of ../ instances
or leave them as is. See TryGhost#1028.
- The = character is now HTML escaped. This closes a potential exploit
case when using unquoted attributes, i.e. <div foo={{bar}}>. In general
it's recommended that attributes always be quoted when their values are
generated from a mustache to avoid any potential exploit surfaces.
geekhuyang pushed a commit to geekhuyang/Ghost that referenced this pull request Nov 20, 2016
refs TryGhost#2459

This includes updating handlebars to v4 as well as other fixes which
will introduce breaking changes to the theme API:

From express-hbs:
- partials must now use the `.hbs` extension, the same as templates
From handlebars:
- Depthed paths are now conditionally pushed on to the stack.
If the helper uses the same context, then a new stack is not created.
This leads to behavior that better matches expectations for helpers
like if that do not seem to alter the context. Any instances of ../
in templates will need to be checked for the correct behavior under 4.0.0.
In general templates will either reduce the number of ../ instances
or leave them as is. See TryGhost#1028.
- The = character is now HTML escaped. This closes a potential exploit
case when using unquoted attributes, i.e. <div foo={{bar}}>. In general
it's recommended that attributes always be quoted when their values are
generated from a mustache to avoid any potential exploit surfaces.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants