-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Bug 1031612 - In PDF Viewer, the buggy XMP title "Untitled" overrides th... #5287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
if (metadata && metadata.has('dc:title')) { | ||
pdfTitle = metadata.get('dc:title'); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still want metadata title be a preference
The idea at https://bugzilla.mozilla.org/show_bug.cgi?id=1031612#c4 is not implemented here. |
@@ -1164,7 +1164,10 @@ var PDFView = { | |||
|
|||
var pdfTitle; | |||
if (metadata && metadata.has('dc:title')) { | |||
pdfTitle = metadata.get('dc:title'); | |||
var title = metadata.get('dc:title'); | |||
if (title !== 'Untitled') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to make this check case insensitive, e.g. like this:
if (title.toLowerCase() !== 'untitled') {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (title.toLowerCase() !== 'untitled') {
I would disagree with checking a lower case equivalent, but I would certainly expect to see a comment with explanation why we are doing the comparison.
… the document info title
/botio-windows preview |
From: Bot.io (Windows)ReceivedCommand cmd_preview from @yurydelendik received. Current queue size: 0 Live output at: http://107.22.172.223:8877/b3227f64a9bdebb/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/b3227f64a9bdebb/output.txt Total script time: 1.04 mins Published
|
Bug 1031612 - In PDF Viewer, the buggy XMP title "Untitled" overrides th...
Thank you |
...e document info title
Reordered to make sure if info['Title'] exists, assign pdfTitle to it.