Skip to content

Commit 4bd8b63

Browse files
committed
Fix language parser
Resolves #13
1 parent 48aab9c commit 4bd8b63

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

Classes/File/Converter.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,10 @@ protected function generateFileContent(string $xmlFile, string $langKey): string
192192
$xml[] = '<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">';
193193
$xml[] = ' <file source-language="en"'
194194
. ($langKey !== 'default' ? ' target-language="' . $langKey . '"' : '')
195-
. ' datatype="plaintext" original="EXT:' . $this->extension . '/Resources/Private/Language/locallang.xlf" date="'
196-
. gmdate('Y-m-d\TH:i:s\Z') . '"' . ' product-name="' . $this->extension . '">';
195+
. ' datatype="plaintext" original="EXT:' . $this->extension
196+
. '/Resources/Private/Language/locallang.xlf" date="'
197+
. gmdate('Y-m-d\TH:i:s\Z')
198+
. '" product-name="' . $this->extension . '">';
197199
$xml[] = ' <header/>';
198200
$xml[] = ' <body>';
199201

Classes/Localization/Parser/LocallangXmlParser.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,7 @@ protected function parseXmlTargetFile(string $targetPath): array
164164
$rootXmlNode = false;
165165
if (file_exists($targetPath)) {
166166
$xmlContent = file_get_contents($targetPath);
167-
// Disables the functionality to allow external entities to be loaded when parsing the XML, must be kept
168-
$previousValueOfEntityLoader = libxml_disable_entity_loader(true);
169167
$rootXmlNode = simplexml_load_string($xmlContent, \SimpleXMLElement::class, LIBXML_NOWARNING);
170-
libxml_disable_entity_loader($previousValueOfEntityLoader);
171168
}
172169
if ($rootXmlNode === false) {
173170
$xmlError = libxml_get_last_error();

0 commit comments

Comments
 (0)