Part 1 Linking at will "Special characters must be escaped" error


#1

I'm at a point where I'm reviewing, and I had this problem before, where my code runs successfully, but I still get the "special characters must be escaped" error and I'm not sure what that means or how to resolve it.

In this example, the error only occurs (or highlights) on the "<" angle bracket on the <img tag (there is only one, toward the bottom). Any Insight would be greatly appreciated!


<!DOCTYPE html>
<html>
<head>
  <title>
  </title>
</head>
<body>
  <h1>Practice HTML</h1>
 
  <p>This is an example paragraph. Today is Sunday and I'm trying to learn HTML while I watch Bob's Burgers.</p>

  <p>Some Bob's Burger's characters:</p>
  <ul>
    <li>Bob</li>
    <li>Lynda</li>
    <li>Tina</li>
    <li>Gene</li>
    <li>Louise</li>
    <li>Teddy</li>
  </ul>
<a href="https://en.wikipedia.org/wiki/Bob%27s_Burgers" target="_blank"> Bob's Burger's Wiki Page</a>
  
  <p>Louise is my favorite character</p>
  
  <img src="https://pmctvline2.files.wordpress.com/2012/09/bobs-burgers-louise.jpg?w=300&h=240" alt="Louise wearing pink bunny ears"
</body> 
</html>


#2

Character code 27 is the ASCII Escape character. Any special character, that is, non-alpha, non-numeric, must be escaped if we wish the parser to recognize it as a printable character. URL's are intentionally printable characters so they can be transmitted. A space in a URL is a special character.

The above is a preamble gleaned from a quick scan of your code. Will give the question further consideration and hopefully furnish a sensible explanation, presently. In the meantime, do you have a link to the exercise that we might peruse?


#3

Oh yes! My aplologies!

https://www.codecademy.com/en/courses/learn-html-css/lessons/common-elements/exercises/review-common-elements


#4

I must be spaced out or something. %27 is HEX. for character code 39. the single quote. D'oh!

And the modulo is the escape character from an encoding perspective. Pardon me for getting off track.

The error is a missing right carat, > on your img tag. However, the parser does not necessarily expect one as the next input. Any character will do, but since a newline (line break) is a special character, it must be preceded with \ to escape it.

In some environments the continuation token (or character) is recognized as an escape that allows the data or code to continue on the next physical line.


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.