After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 746252 - Google: Album titles appears htmlescaped
Google: Album titles appears htmlescaped
Status: RESOLVED FIXED
Product: gnome-photos
Classification: Applications
Component: general
3.15.x
Other All
: Normal normal
: ---
Assigned To: GNOME photos maintainer(s)
GNOME photos maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-03-15 16:38 UTC by Baptiste Mille-Mathias
Modified: 2015-03-28 13:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The titlebar now shows the title properly. (1.75 KB, patch)
2015-03-26 04:20 UTC, sparshpaliwal123@gmail.com
needs-work Details | Review
Bug746252_commit_fix (1.72 KB, patch)
2015-03-26 10:04 UTC, sparshpaliwal123@gmail.com
none Details | Review
main-toolbar: Escape special characters only when using markup (1.73 KB, patch)
2015-03-27 13:34 UTC, sparshpaliwal123@gmail.com
committed Details | Review
[gnome-3-14] main-toolbar: Escape special characters only when using markup (1.69 KB, patch)
2015-03-28 13:28 UTC, Debarshi Ray
committed Details | Review

Description Baptiste Mille-Mathias 2015-03-15 16:38:27 UTC
I have a google album named "Lac de l'Avellan", which appears as "Lac de l'Avellan" so I assume gnome-photos doesn't converted back text htmlescaped.
Comment 1 Debarshi Ray 2015-03-19 08:59:04 UTC
Worth investigating whether this affects gnome-documents too.
Comment 2 sparshpaliwal123@gmail.com 2015-03-24 15:48:35 UTC
@Debarshi There is no such problem in gnome-documents I renamed one of my documents in google drive as Lac de l'Avellan and the title of the corresponding item in gnome-documents was normal.
Screenshot - 
https://drive.google.com/file/d/0B3GzDUy0ulh-Z2FCRG9uMi1nVVk/view?usp=sharing
Comment 3 Debarshi Ray 2015-03-24 16:12:34 UTC
(In reply to sparshpaliwal123@gmail.com from comment #2)
> @Debarshi There is no such problem in gnome-documents I renamed one of my
> documents in google drive as Lac de l'Avellan and the title of the
> corresponding item in gnome-documents was normal.

You would have to have an item on a remote online account with such a name to test this. Just renaming an existing item from the application won't work.
Comment 4 sparshpaliwal123@gmail.com 2015-03-24 19:04:54 UTC
@Debarshi Indeed I did the very same renamed my google drive document in google drive only and changes were automatically reflected in gnome documents.
Google drive screenshot-
https://drive.google.com/file/d/0B3GzDUy0ulh-YWJtTTFSRXBuNXc/view?usp=sharing
Comment 5 Debarshi Ray 2015-03-25 14:47:45 UTC
(In reply to sparshpaliwal123@gmail.com from comment #4)
> @Debarshi Indeed I did the very same renamed my google drive document in
> google drive only and changes were automatically reflected in gnome
> documents.
> Google drive screenshot-
> https://drive.google.com/file/d/0B3GzDUy0ulh-YWJtTTFSRXBuNXc/view?usp=sharing

I see, ok. In that case, indeed, gnome-documents seems fine.

I can reproduce this bug for Flickr albums too.
Comment 6 Debarshi Ray 2015-03-25 15:06:43 UTC
Here is a hint. This is a fall out from this commit:

commit f284c1e71108bbfaffc32aaf96326457726823e1
Author: Emanuele Aina <emanuele.aina@collabora.com>
Date:   Mon May 20 11:04:04 2013 +0100

    main-toolbar: Escape markup when setting the toolbar title
    
    Use g_markup_printf_escaped() to properly escape strings.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=702909


That patch should have escaped only those cases which use markup.
Comment 7 sparshpaliwal123@gmail.com 2015-03-26 04:20:24 UTC
Created attachment 300332 [details] [review]
The titlebar now shows the title properly.

Works perfectly.
Tested with "Lac de l'Avellan" and my account on Flickr.
Comment 8 Debarshi Ray 2015-03-26 08:30:13 UTC
Review of attachment 300332 [details] [review]:

Thanks for the patch, Sparsh. It looks functionally correct to me.

The commit message needs some work. There is no need to have "Bug 702909" in the subject. The rest of the subject is a copy of the older commit that introduced the regression. The subject of your commit should be about your commit. eg., it could be "main-toolbar: Escape special characters only when using markup". See https://wiki.gnome.org/Git/CommitMessages for more details.

Do you usually write your name as "PaliwalSparsh"? Whatever you use in your commit will show up in the application's about dialog.
Comment 9 sparshpaliwal123@gmail.com 2015-03-26 10:04:05 UTC
Created attachment 300342 [details] [review]
Bug746252_commit_fix

I am sorry for the mistake with the subject. And thanks for pointing out author name mistake or else I would have kept on doing it. I will certainly update it.
Comment 10 Debarshi Ray 2015-03-27 12:55:22 UTC
Review of attachment 300342 [details] [review]:

Thanks Sparsh. It looks much better now.

There is no need for "Use g_markup_printf_escaped() ..." in the commit message. If at all anything, we are removing unnecessary uses of the function. Just remove that line because it is misleading.

::: src/photos-main-toolbar.c
@@ +133,3 @@
       item = photos_base_manager_get_active_object (priv->item_mngr);
       if (item != NULL)
+        primary = g_strdup (photos_base_item_get_name (PHOTOS_BASE_ITEM (item)));

It should continue to be photos_base_item_get_name_with_fallback, not photos_base_item_get_name.
Comment 11 sparshpaliwal123@gmail.com 2015-03-27 13:34:33 UTC
Created attachment 300443 [details] [review]
main-toolbar: Escape special characters only when using markup

Thankyou, I have updated the code and commit message as you told.
Comment 12 Debarshi Ray 2015-03-27 19:40:38 UTC
Review of attachment 300443 [details] [review]:

Unfortunately, the fall out commit id is wrong. There is no such commit in our repository. I fixed it and committed the patch.
Comment 13 Debarshi Ray 2015-03-28 13:28:38 UTC
Created attachment 300517 [details] [review]
[gnome-3-14] main-toolbar: Escape special characters only when using markup