Identifier with comma

Bug #1779602 reported by leastcommonancestor on 2018-07-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

I have an identifier that contains a commma. It should be translated to URL.
I tried percent encoding, i.e. in place of the comma I used "%2C", but the resulting URL had "%252C", i.e. the percent sign got encoded. I do not see how to escape the comma in the identifier. Furthermore, I think that percent encoding should be supported - in some way.

If you want to enter an identifier with a comma in it, right click on
the identifiers field and choose "Edit identifiers in a dedicated
window"

If you dont want to do that, you can also use the | symbol in the
identifiers field as a stand-in for comma (it will be interpreted as a
comma when you click on the url in the book details panel)

 status fixreleased

Changed in calibre:
status: New → Fix Released

Thank you for your quick response. But in both cases the "|" character
is url encoded to "%7C" in the resulting url, which does not work.

Greetings

LCA

On 02.07.2018 07:35, Kovid Goyal wrote:
> If you want to enter an identifier with a comma in it, right click on
> the identifiers field and choose "Edit identifiers in a dedicated
> window"
>
> If you dont want to do that, you can also use the | symbol in the
> identifiers field as a stand-in for comma (it will be interpreted as a
> comma when you click on the url in the book details panel)
>
> status fixreleased
>
> ** Changed in: calibre
> Status: New => Fix Released
>

Works for me, steps I tried:

1) Click edit metadata
2) In the Ids box type: url:http://example.com/a|b
3) Click OK
4) Right click the test.com entry in the book details panel and choose,
"Copy link address"
5) Paste the copied address in an editor, which is:
http://example.com/a,b

This works for me, too – with url-identifiers. However, I have e.g. a
rule defined to convert foobar:xyz to http://foobar.com/xyz.
There, foobar:x,y will result in http://foobar.com/x%7Cy.

On 02.07.2018 08:16, Kovid Goyal wrote:
> Works for me, steps I tried:
>
> 1) Click edit metadata
> 2) In the Ids box type: url:http://example.com/a|b
> 3) Click OK
> 4) Right click the test.com entry in the book details panel and choose,
> "Copy link address"
> 5) Paste the copied address in an editor, which is:
> http://example.com/a,b
>

What rule?

Preferences/Look & Feel/Book Details/Create rules to convert identifiers:
Key: wpen
Template: https://en.wikipedia.org/wiki/{id}

Identifier: wpen:Gun|_with_Occasional_Music
Resulting URL: https://en.wikipedia.org/wiki/Gun%7C_with_Occasional_Music

On 02.07.2018 08:41, Kovid Goyal wrote:
> What rule?
>

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Thank you for the quick fixing. However,  the feature that in place of
comma the vertical bar may be used, should be mentioned somewhere in the
documentation. I tried searching for "identifier comma escape" and
"identifier comma" but could not find it.

Greetings

LCA

On 02.07.2018 10:21, Kovid Goyal wrote:
> Fixed in branch master. The fix will be in the next release. calibre is
> usually released every alternate Friday.
>
> status fixreleased
>

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers