This lab is about converting special characters in a string with their corresponding HTML entities.
Objective: Fulfill the user stories below and get all the tests to pass to complete the lab.
User Stories:
-
You should have a convertHTML function that accepts a string as an argument.
-
The convertHTML function should return a new string by converting special characters in the argument string to their corresponding HTML entities.
& should be converted to &.
< should be converted to <.
> should be converted to >.
" should be converted to ".
' should be converted to '.