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

New Function: Shorten #64

Closed
neocotic opened this Issue Feb 8, 2012 · 2 comments

Comments

Projects
None yet
1 participant
@neocotic
Member

neocotic commented Feb 8, 2012

Calls the URL shortener service with the rendered contents (hopefully a URL - trust the user here but perform simple validation - i.e. is blank, maybe also check that it matches /^https?:\/\/\S+\.\S+/).

During the initial render, replace all URLs with a unique placeholder (using utils.keyGen w/o a separator) while ensuring duplicate URLs are replaced with the same placeholders (minimizing calls to the web service) and then render the result again for each replacement, this time replacing the placeholders with the response from the web service (or showing any errors if they were encountered).

This makes {short} obsolete and therefore should be deprecated, replacing its functionality with {#shorten}{url}{/shorten}, which should also be used to replace the contents of the Short template.

@neocotic

This comment has been minimized.

Show comment
Hide comment
@neocotic

neocotic Feb 10, 2012

Member

I need to fix OAuth. I'm not sure why it's no longer working but it needs fixed. I'll compare the request sent now to that sent prior to these changes and hopefully that'll help identify the source of this issue.

I'm happy with the way it's working otherwise.

Member

neocotic commented Feb 10, 2012

I need to fix OAuth. I'm not sure why it's no longer working but it needs fixed. I'll compare the request sent now to that sent prior to these changes and hopefully that'll help identify the source of this issue.

I'm happy with the way it's working otherwise.

neocotic added a commit that referenced this issue Feb 13, 2012

neocotic added a commit that referenced this issue Feb 13, 2012

@neocotic

This comment has been minimized.

Show comment
Hide comment
@neocotic

neocotic Feb 13, 2012

Member

The recent changes for #20 have enabled this process to flow much smoother and without incident. I'm very happy with the results.

Member

neocotic commented Feb 13, 2012

The recent changes for #20 have enabled this process to flow much smoother and without incident. I'm very happy with the results.

@neocotic neocotic closed this Feb 13, 2012

@neocotic neocotic added the accepted label Nov 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment