Fix incorrect PDF title display when multiple language titles present in XMP metadata (issue 20801)#20874
Open
nyxsky404 wants to merge 3 commits intomozilla:masterfrom
Open
Fix incorrect PDF title display when multiple language titles present in XMP metadata (issue 20801)#20874nyxsky404 wants to merge 3 commits intomozilla:masterfrom
nyxsky404 wants to merge 3 commits intomozilla:masterfrom
Conversation
… in XMP metadata (issue 20801)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #20874 +/- ##
==========================================
+ Coverage 62.51% 62.56% +0.04%
==========================================
Files 173 173
Lines 121246 121278 +32
==========================================
+ Hits 75796 75872 +76
+ Misses 45450 45406 -44
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #20801
Problem
When a PDF has multiple language titles in XMP metadata using
rdf:Alt, the titles were being concatenated instead of selecting a single title. For example, a PDF with bothx-defaultandenlanguage titles would display "Hello WorldHello World" instead of "Hello World".Solution
rdf:Altelements fordc:titleanddc:descriptionx-defaultlanguage entry if present, otherwise uses the first entryhasAttributesoption in SimpleXMLParser to readxml:langattributesTesting
x-defaultx-default