GrammAcc

GrammAcc

Bugfix update for Cartograph - E2E Query Param Patching for LiveView

LiveView uses URI.decode_www_form for query params, which causes a literal plus sign in a param value to be converted to a space unless the query is first urlform encoded.

This change updates the query parsing logic used by cartograph_patch and cartograph_navigate to use URI.encode_www_form/1 on the keys and values of the generated query string instead of URI.encode/2 on the full query string.

We encode the keys and values individually because using URI.encode_www_form/1 on the full query string causes it to escape the equals signs, which causes Phoenix to parse the query string into a single key in the resulting map instead of all the key-value pairs we would expect.

Ran into this on my website after I added support for the Rebirth for You card game which uses plus signs for parallel rarities. I think this solution should be robust, but I only have one Elixir site running in production, so please open an issue on the GH repo GitHub - GrammAcc/cartograph: URI-Based Navigation for Phoenix LiveView · GitHub if the use of URI.encode_www_form/1 causes problems for your project. :slight_smile:

Also, thanks @roflbobl for the doc formatting fix. Sorry for not getting that merged earlier. GH never notified me about the PR for some reason. :person_shrugging:

Unrelated to this release, but I have been using this lib in production on my website for about 5 months now without any issues (until this encoding problem), so I’m planning to bump to 1.0 sometime soon to acknowledge stability of the API. I’m in the middle of building a pretty significant feature for my website that will make heavy use of this lib, so I’ll wait until after that feature is working in production, but hopefully won’t be too far away. :slight_smile:

Where Next? Top

Trending in News & Updates Top

mat-hek
Popcorn, the library that runs Elixir code in the browser, is now stable :popcorn: This is possible because it now builds on a very stab...
New
bartblast
Hologram UI is in the works - the official component library for Hologram - and the waiting list is now open. A common reaction when I m...
New
bartblast
This thread is for updates on the Hologram website (docs, new pages, roadmap, feature status, etc.). You can watch this thread to get no...
New
mandar1045
Stampede 1.2 is out, and I finally got to try it at a bigger scale. What’s new --find-limit: instead of a fixed number of users, it add...
New
uzaydurdu
Hey Elixir folks, I’ve been working on Xenia 0.2.0, and it’s nearly ready. This release focuses on performance, easier integration, and...
New
rodloboz
Hi all, I’ve just released Sake 0.5.0, and I want to explain better what it’s for, because I think many Phoenix apps can use it now. Wh...
New
Potions
I’m working to make Potions the easiest way to deploy Elixir applications, and the next step in that journey is live: you can now bring y...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
raa-ziq
Hi everyone :waving_hand: I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New
kip
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews