mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-15 19:31:26 +00:00
Assume that an XML declaration is at the beginning of a document
This commit is contained in:
parent
0b3700999b
commit
aa6d8be697
1 changed files with 1 additions and 1 deletions
|
@ -179,7 +179,7 @@ module Agents
|
|||
else
|
||||
# Encoding is already known, so do not let the parser detect
|
||||
# it from the XML declaration in the content.
|
||||
body.sub!(/(<\?xml(?:\s+\w+\s*=\s*(['"]).*?\2)*)\s+encoding\s*=\s*(['"]).*?\3/, '\\1')
|
||||
body.sub!(/(\A\u{FEFF}?\s*<\?xml(?:\s+\w+\s*=\s*(['"]).*?\2)*)\s+encoding\s*=\s*(['"]).*?\3/, '\\1')
|
||||
end
|
||||
body
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue