We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad1e829 commit 47ac582Copy full SHA for 47ac582
apps/palindrome-checker/public/script.js
@@ -14,13 +14,13 @@ const checkForPalindrome = input => {
14
resultDiv.replaceChildren();
15
16
const lowerCaseStr = input.replace(/[^A-Za-z0-9]/gi, '').toLowerCase();
17
- let resultMsg = `<strong>${originalInput}</strong> ${
+ let resultMsg = `${originalInput} ${
18
lowerCaseStr === [...lowerCaseStr].reverse().join('') ? 'is' : 'is not'
19
} a palindrome.`;
20
21
const pTag = document.createElement('p');
22
pTag.className = 'user-input';
23
- pTag.innerHTML = resultMsg;
+ pTag.innerText = resultMsg;
24
resultDiv.appendChild(pTag);
25
26
// Show the result.
0 commit comments