EOY 2015 anchor to work with & in the href #64
Conversation
@glogiotatidis We noticed something, the url needs the & to be parsed and replaced with &, as seen in last year's snippet: https://github.com/mozilla/snippets/blob/master/campaigns/mofo-eoy-2014/deliverables/eoy2-deliverable.html#L246 review? |
@schalkneethling can you shed some light here? As you know
I understand that |
@glogiotatidis Yes, technically having the ampersands escaped is absolutely fine and the URL should reach it's intended destination just fine. I did run into a problem with these exact URLs where using |
We don't have a history with this workaround. AFAIK all snippet links are Can any or both of you give more info about the problems with these urls? I did test them and I did read the parameters correctly on the server side. |
When I test it, locally, the brief moment it was prod, and when I am shared the results from staging, the link I was getting redirected to had the It's interesting that last year's had this workaround, which is why I thought it was needed. Can I see an example of where this is working? |
aha ok good to know
I just tried it with this template code and custom bottle app and it worked like a charm |
@glogiotatidis I'm more than happy to not have my change, if you can you confirm first that the |
@glogiotatidis also, this brings me to another question. I'm adding in params manually, which I use regular |
that's an interesting point. do you mind testing this out? Also how do you test? |
Yes, with what I tried the bottle app parsed correctly the query arguments. |
@glogiotatidis I'm testing i locally in a node app, and I am aware that it wouldn't be a reliable example of what's happening on staging or production, which is why I didn't initially push very hard about this being broken. However, the staging links I am shared are retaining the |
I'm looking at the snippet home page, and the about mozilla link at the top has the |
Please do, I'm interested in your findings. |
Interesting, so I made the anchor tag: and it returns with a working Once I add it via javascript, it breaks. I think the |
Based on this, I think seeing how I am only using the url inside javascript, it might be optimal to never have the I could also drop the value right in the element instead of js, and then just append to it. That might be optimal, actually. |
I think I'm making a new pull request with my findings, solving this mystery. |
21e0a08
to
fa7cacd
Compare
@glogiotatidis fixed! Updating commit message, and I think this fix is going to make us both happy. |
fa7cacd
to
ebba2e2
Compare
Works just fine. Many thanks for your research and fix Scott. |
EOY 2015 anchor to work with & in the href
@glogiotatidis and thanks for your patience :) |
No description provided.