Title: Uncaught SyntaxError: Unexpected identifier &#8216;tel&#8217;
Last modified: July 3, 2026

---

# Uncaught SyntaxError: Unexpected identifier ‘tel’

 *  [Praful Patel](https://wordpress.org/support/users/praful2111/)
 * (@praful2111)
 * [2 weeks, 2 days ago](https://wordpress.org/support/topic/uncaught-syntaxerror-unexpected-identifier-tel/)
 * I facing the issues with below one.
 * I had added HTML directly into the content field, for example:
 *     ```wp-block-code
       <a href="tel:234234">Call Us</a>
       ```
   
 * Instead of saving only plain content. After saving the post, the browser throws
   the following console error:
 *     ```wp-block-code
       Uncaught SyntaxError: Unexpected identifier 'tel'
       ```
   
 * (on `post.php?post=3477&action=...`).
 * After investigating, it appears that the JavaScript parser is failing because
   the HTML content is being injected into JavaScript without being properly escaped
   or JSON encoded. As a result, the `href="tel:..."` attribute breaks the generated
   JavaScript, causing the syntax error.
 * The content should either be properly escaped before being embedded in JavaScript
   or passed using JSON encoding so that HTML is handled safely.
 * Image Url – [https://drive.google.com/file/u/1/d/1C-BbojC_Fh2ByfmrGMrMAnQcmX0feFF1/view?usp=drive_open](https://drive.google.com/file/u/1/d/1C-BbojC_Fh2ByfmrGMrMAnQcmX0feFF1/view?usp=drive_open)
   
   [https://drive.google.com/file/d/1JBgaymdd_qXybeWpVlzRbzhhyZ6DRjuM/view](https://drive.google.com/file/d/1JBgaymdd_qXybeWpVlzRbzhhyZ6DRjuM/view)
    -  This topic was modified 2 weeks, 2 days ago by [Praful Patel](https://wordpress.org/support/users/praful2111/).

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funcaught-syntaxerror-unexpected-identifier-tel%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/logic-hop/assets/icon-256x256.png?rev=1914075)
 * [Logic Hop - Dynamic Content Personalization for WordPress](https://wordpress.org/plugins/logic-hop/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/logic-hop/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/logic-hop/)
 * [Active Topics](https://wordpress.org/support/plugin/logic-hop/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/logic-hop/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/logic-hop/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Praful Patel](https://wordpress.org/support/users/praful2111/)
 * Last activity: [2 weeks, 2 days ago](https://wordpress.org/support/topic/uncaught-syntaxerror-unexpected-identifier-tel/)
 * Status: not resolved