-
Notifications
You must be signed in to change notification settings - Fork 2
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 uri_encode (#273) #314
Conversation
Use metamorph's URLEncoder for uri_encode.
uri_encode { | ||
@Override | ||
public void apply(final Metafix metafix, final Record record, final List<String> params, final Map<String, String> options) { | ||
URL_ENCODER.setPlusForSpace(false); |
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.
Preferrably, we would expose this as an option plus_for_space
(along with safe_chars
). But I don't think it's necessarily a blocker.
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.
Agreed - we can, if needed, easily enhance to use options.
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.
Okay, but I'll unresolve it as a reminder.
Would you also document this new function in the README? |
Updated the README. |
Now we're entering shaky territory ;) We differentiate between "record-level" and "field-level" methods. You placed the implementation in the latter section, but the documentation in the former. I don't think we have clear criteria for which is which (@fsteeg, @TobiasNx?), but this one is almost definitely "field-level" I would say (so the documentation should match the implementation). |
No, makes sense. Wasn't aware of two sections. Moved docu snippet to the proper place. Please have a look again. |
Ahhh - I put it into |
And I named the wrong section in the commit message :( Probably started the weekend a little early ;) Fixed it in b3420ec and force-pushed. Hope that's okay. |
db84fb7
to
b3420ec
Compare
timely :) |
This creates strange URIs. Probably needs to be fixed in metafacture-fix.
Use metamorph's URLEncoder for uri_encode.
Supersedes #285.