-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
URL rewrite in templates #1645
URL rewrite in templates #1645
Conversation
c7e4363
to
8377a9d
Compare
* Reconstructs the string expression for this srcset. | ||
* @return {string} | ||
*/ | ||
stringify() { |
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.
This would generally be called #toString
, so that coercion will work correctly:
var obj = {
toString() { return 'test'; }
};
String(obj); // => 'test'
'' + obj; // => 'test'
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 don't really like coercion to be honest. Usually I try to steer away. You feel strongly about it, I'll switch.
@cramforce changes have been made. PTAL. |
7f6ab57
to
1219698
Compare
@cramforce freundlich Ping! |
function resolveImageUrlAttr(attrValue, baseUrl, isProxy) { | ||
const src = parseUrl(resolveRelativeUrl(attrValue, baseUrl)); | ||
|
||
// URLs such as `data:` or proxy URLs are returned as is. |
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.
Need to document here why this is safe.
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.
Ok. I made it explicit to data:
LGTM with one comment. If the comment is correct. Otherwise not LGTM :) |
1219698
to
1e7bb39
Compare
No description provided.