diff --git a/data/embeds/ufora.py b/data/embeds/ufora.py
index c445e1b..2f2dbe3 100644
--- a/data/embeds/ufora.py
+++ b/data/embeds/ufora.py
@@ -1,17 +1,17 @@
-from datetime import datetime
+from datetime import datetime, timedelta
from discord import Embed, Colour
from functions.stringFormatters import leadingZero as lz
from functions.timeFormatters import intToWeekday
-from markdownify import markdownify as md
+from html import unescape
import pytz
+import re
class UforaNotification:
def __init__(self, content: dict, course, notif_id, course_id):
self._content: dict = content
self._course = course
- self._notif_id = notif_id
- self._course_id = course_id
+ self._notif_id, self._course_id = notif_id, course_id
self._view_url = self._create_url()
self._title = self._clean_content(self._content["title"])
self._description = self._get_description()
@@ -40,24 +40,54 @@ class UforaNotification:
def _get_description(self):
desc = self._clean_content(self._content["summary"])
- if len(desc) > 4096:
- return desc[:4093] + "..."
+ if len(desc) > 500:
+ return desc[:497] + "..."
return desc
def _clean_content(self, text: str):
- return md(text)
+ # Dict with HTML & markdown tags to replace
+ html_table = {
+ # CHARACTERS:
+ "&": '&',
+ """: '"',
+ "apos;": "'",
+ ">": ">",
+ "<": "<",
+ # MARKDOWN SUPPORT:
+ "": "**",
+ "": "**",
+ "": "**",
+ "": "**",
+ "": "*",
+ "": "*",
+ "": "*",
+ "": "*",
+ "": "~~",
+ "": "~~",
+ "": "__",
+ "": "__",
+ # Represent paragraphs with newlines
+ "