Mercurial > hg > mgallery
comparison mgtool.php @ 312:326935332784
Remove <?xpacket ?> from the XMP, as SimpleXML can't parse it.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 06 Apr 2020 18:36:23 +0300 |
parents | 8fd5c850f921 |
children | d94b0ebe97c6 |
comparison
equal
deleted
inserted
replaced
311:8fd5c850f921 | 312:326935332784 |
---|---|
330 { | 330 { |
331 // SimpleXML apparently can't handle namespaces, | 331 // SimpleXML apparently can't handle namespaces, |
332 // so we will crudely remove them with some regexes | 332 // so we will crudely remove them with some regexes |
333 $xmpPatterns = | 333 $xmpPatterns = |
334 [ | 334 [ |
335 "/<\?xpacket\s+.*?\?>/", | |
335 "/[a-zA-Z]+:/", | 336 "/[a-zA-Z]+:/", |
336 "/\/[a-zA-Z]+:/", | 337 "/\/[a-zA-Z]+:/", |
337 "/<\/?(Bag|Alt|Seq)>/" | 338 "/<\/?(Bag|Alt|Seq)>/" |
338 ]; | 339 ]; |
339 | 340 |
340 $xmpReplacements = | 341 $xmpReplacements = |
341 [ | 342 [ |
343 "", | |
342 "", | 344 "", |
343 "\/", | 345 "\/", |
344 "", | 346 "", |
345 ]; | 347 ]; |
346 | 348 |