CLASSROOMIO-T-227: Exercise Statistics
CLASSROOMIO-T-227: 🔥 🔥 🔥 🔥 Improvements CLASSROOMIO-T-227:Worked on the Exercise Statistics CLASSROOMIO-T-227:Worked on the Exercise Statistics CLASSROOMIO-T-227:Worked on the Exercise Statistics Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com> Co-authored-by: Ifeanyi Nwosu <ifeanyi@digdippa.com> Co-authored-by: Rotimi Best <rotimiibitoyeemma@gmail.com> Merge-request: CLASSROOMIO-MR-111 Merged-by: Best Admin <best@digdippa.com>
This commit is contained in:
committed by
Space Cloud
co-authored by
Rotimi Best
Rotimi Best
parent
b21d5923e6
commit
5c8571e571
@@ -26,3 +26,16 @@ export const getTextFromHTML = (html: string): string => {
|
||||
|
||||
return dummyDiv.textContent?.trim() || '';
|
||||
};
|
||||
|
||||
const tagsToReplace = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>'
|
||||
};
|
||||
|
||||
export function replaceHTMLTag(text: string) {
|
||||
return text
|
||||
.split('')
|
||||
.map((char) => tagsToReplace[char] || char)
|
||||
.join('');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user