Bug: Incorrect url anchor parsing by juce::URL constructor

The constructor juce::URL(const String& url) parses the anchor as part of the last parameter:

const juce::URL url{http://www.some-server-in-web.com?P1=v1&P2=v2#anchor};
juce::String string = url.toString(true);
juce::StringArray parameterNames = url.getParameterNames();
juce::StringArray parameterValues = url.getParameterValues();

After execution string contains http://www.some-server-in-web.com?P1=v1&P2=v2%23anchor.
Instead of %23 it should contain a simple #.
Also parameterValues[1] is v2#anchor instead of v2.

2 Likes

Thanks for reporting. A fix for this is currently in review.

1 Like