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 659751 - accentuated characters in filename breaks format function regexp.
accentuated characters in filename breaks format function regexp.
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
unspecified
Other Linux
: Normal major
: ---
Assigned To: GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2011-09-21 17:16 UTC by Alban Browaeys
Modified: 2011-09-22 00:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
limit the scope the format function is applied to , to avoid confusing accents with format (1.30 KB, patch)
2011-09-21 17:16 UTC, Alban Browaeys
committed Details | Review

Description Alban Browaeys 2011-09-21 17:16:27 UTC
Created attachment 197177 [details] [review]
limit the scope the format function is applied to , to avoid confusing accents with format 

Applying format to the full query string fails when this query srting contains spurious percent characters, ie accentuated ones.

    JS ERROR: !!!   Exception was: Error: Unsupported conversion character %C
    JS ERROR: !!!     lineNumber = '56'
    JS ERROR: !!!     fileName = '"/usr/local/share/gnome-documents/js/format.js"'
    JS ERROR: !!!     stack = '"("%C","","","C",400,"{ }FILTER ((fn:contains (fn:lower-case (tracker:coalesce(nie:title(?urn), nfo:fileName(?urn))), \"\") ||fn:contains (fn:lower-case (tracker:coalesce(nco:fullname(?creator), nco:fullname(?publisher))), \"\")) && (((fn:starts-with (nie:url(?urn), \"file:///home/prahal/Bureau\")) ||  (fn:starts-with (nie:url(?urn), \"file:///home/prahal/Documents\")) ||  (fn:starts-with (nie:url(?urn), \"file:///home/prahal/T%C3%A9l%C3%A9chargements\"))    ) || ((nie:dataSource(?urn) = \"gd:goa-account:account_1316092886\") || (nie:dataSource(?urn) = \"gd:goa-account:account_1314928782\") || false)) && ((true)) && ((fn:contains(rdf:type(?urn), \"nfo#PaginatedTextDocument\") ||fn:contains(rdf:type(?urn), \"nfo#Spreadsheet\") ||fn:contains(rdf:type(?urn), \"nfo#Presentation\")))) } ORDER BY DESC (?mtime)LIMIT %d OFFSET %d")@/usr/local/share/gnome-documents/js/format.js:56
format(50,0)@/usr/local/share/gnome-documents/js/format.js:20
(true)@/usr/local/share/gnome-documents/js/query.js:152
()@/usr/local/share/gnome-documents/js/query.js:181
()@/usr/local/share/gnome-documents/js/trackerController.js:118
()@/usr/local/share/gnome-documents/js/trackerController.js:127
()@/usr/local/share/gnome-documents/js/trackerController.js:63
TrackerController()@/usr/local/share/gnome-documents/js/trackerController.js:35
([object _private_Goa_Client],[object _private_Gio_SimpleAsyncResult])@/usr/local/share/gnome-documents/js/application.js:148
start()@/usr/local/share/gnome-documents/js/main.js:27
@<command line>:1
"'
Comment 1 Cosimo Cecchi 2011-09-21 17:21:12 UTC
Review of attachment 197177 [details] [review]:

Looks good and safe. I will have to ask release-team for a hard code freeze break before pushing this though.
Comment 2 Cosimo Cecchi 2011-09-22 00:54:07 UTC
Pushed now after r-t approval.