Skip to content

Nobledsmarts/Convert-HTML-Entities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Convert-HTML-Entities

Convert the characters &, <, >, " (double quote), and ' (apostrophe), in a string to their corresponding HTML entities.

Tests

convertHTML("Dolce & Gabbana") should return the string Dolce & Gabbana.

convertHTML("Hamburgers < Pizza < Tacos") should return the string Hamburgers < Pizza < Tacos.

convertHTML("Sixty > twelve") should return the string Sixty > twelve.

convertHTML('Stuff in "quotation marks"') should return the string Stuff in "quotation marks".

convertHTML("Schindler's List") should return the string Schindler's List.

convertHTML("<>") should return the string <>.

convertHTML("abc") should return the string abc.