Skip to content

Commit e98cf73

Browse files
committed
Fix for getMultilingualText when there's only monolingual text
Change-Id: I0b69a21225ed6bcf8607f5cef06a298e87820037
1 parent fa4a1d0 commit e98cf73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

commons/src/main/java/org/wikimedia/commons/MediaDataExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ private Map<String, String> getMultilingualText(Node parentNode) throws IOExcept
218218
// Hopefully a language code. Nasty hack!
219219
String lang = title;
220220
Node valueNode = findTemplateParameter(node, 1);
221-
String value = Utils.getStringFromDOM(valueNode); // hope there's no subtemplates or formatting for now
221+
String value = valueNode.getTextContent(); // hope there's no subtemplates or formatting for now
222222
texts.put(lang, value);
223223
}
224224
} else if (node.getNodeType() == Node.TEXT_NODE) {

0 commit comments

Comments
 (0)