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
Create Imgur onebox #107
Create Imgur onebox #107
Conversation
Needs to be able to handle albums. |
@krainboltgreene I'll create another response for an album. I'll compare with the regular gallery response to determine how the onebox will be able to tell the difference. |
@vykster reminded me that @markijbema's merged but ultimately deleted commit was for imgur onebox 91c6e05 |
include HTML | ||
|
||
matches do | ||
# /^https?\:\/\/imgur\.com\/.*$/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand this is a comment, but please now that ^ and $ don't do what you'd expect in Ruby. You mean (hopefully) \A and \Z.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We expect them to match the beginning of the line and the end of the line, respectively. That's what they do.
I have no particular interest in imgur though, mainly did that to play around with the discourse codebase. Did you check you support both albums and images? That's the only interesting part about it (though my fix didn't support that yet, nor did the old code). I added three comments regarding security concerns. The latter two are about XSS, if you're already in a tag you don't need > or < to inject javascript, so regular sanitation doesn't work. normally. |
Talked to @krainboltgreene, we should create 2 Imgur oneboxes, one for albums and another for galleries. Adding those to #129 |
@vykster and I decided since Discourse only has support for Imgur images, we'll close this PR and add support for albums in v1.2.0. We'll look back at @markijbema's |
No description provided.