projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add emoji support in statuses in staticfe
[akkoma]
/
lib
/
pleroma
/
web
/
xml
/
xml.ex
diff --git
a/lib/pleroma/web/xml/xml.ex
b/lib/pleroma/web/xml/xml.ex
index da3f68ecba51f22ba966665944f37feb908c2cdf..c69a86a1e37a234c612a4080b147e9f7cc197a28 100644
(file)
--- a/
lib/pleroma/web/xml/xml.ex
+++ b/
lib/pleroma/web/xml/xml.ex
@@
-1,3
+1,7
@@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.Web.XML do
require Logger
defmodule Pleroma.Web.XML do
require Logger
@@
-25,15
+29,15
@@
defmodule Pleroma.Web.XML do
{doc, _rest} =
text
|> :binary.bin_to_list()
{doc, _rest} =
text
|> :binary.bin_to_list()
- |> :xmerl_scan.string()
+ |> :xmerl_scan.string(
quiet: true
)
doc
doc
- catch
-
:exit, _error
->
+ rescue
+
_e
->
Logger.debug("Couldn't parse XML: #{inspect(text)}")
:error
Logger.debug("Couldn't parse XML: #{inspect(text)}")
:error
- rescue
-
e
->
+ catch
+
:exit, _error
->
Logger.debug("Couldn't parse XML: #{inspect(text)}")
:error
end
Logger.debug("Couldn't parse XML: #{inspect(text)}")
:error
end