You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2023/01/12 21:23:20 UTC

[allura] branch master updated: update deprecated html unescape function

This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git


The following commit(s) were added to refs/heads/master by this push:
     new 2a710870e update deprecated html unescape function
2a710870e is described below

commit 2a710870ee738617a56f2628e52e798e1d450cb2
Author: Dave Brondsema <db...@slashdotmedia.com>
AuthorDate: Thu Jan 12 16:22:47 2023 -0500

    update deprecated html unescape function
---
 Allura/allura/tasks/mail_tasks.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Allura/allura/tasks/mail_tasks.py b/Allura/allura/tasks/mail_tasks.py
index 541f47184..16cf82dae 100644
--- a/Allura/allura/tasks/mail_tasks.py
+++ b/Allura/allura/tasks/mail_tasks.py
@@ -14,7 +14,7 @@
 #       KIND, either express or implied.  See the License for the
 #       specific language governing permissions and limitations
 #       under the License.
-
+import html
 import logging
 import six.moves.html_parser
 import re
@@ -126,7 +126,7 @@ def create_multipart_msg(text, metalink=None):
                         plain_text,
                         flags=re.DOTALL,  # match newlines too
                         )
-    plain_text = six.moves.html_parser.HTMLParser().unescape(plain_text)  # put literal HTML tags back into plaintext
+    plain_text = html.unescape(plain_text)  # put literal HTML tags back into plaintext
     plain_msg = mail_util.encode_email_part(plain_text, 'plain')
 
     html_text = g.forge_markdown(email=True).convert(text)