Title: Issue with Href
Last modified: October 10, 2018

---

# Issue with Href

 *  Resolved [caravanguard](https://wordpress.org/support/users/caravanguard/)
 * (@caravanguard)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/issue-with-href/)
 * Hello,
 * I am in text mode and trying to add a snipped inside a href like so
 * `<a href="tel:[wbcr_php_snippet id="666" title="altPhone"]">012345678910</a>`
 * However upon pressing update the item fails and returns
 * `<a title="altphone" href="tel:[wbcr_php_snippet id=">012345678910</a>`
 * As you can see its stripping an malformating the a href. Any clues?
 * Cheers
 * Tim

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [visitmyzoo](https://wordpress.org/support/users/visitmyzoo/)
 * (@visitmyzoo)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/issue-with-href/#post-10772553)
 * I ran into the same problem. For some reason the snippet doesn’t work in quotes.
 * This is what I did to get around the problem.
 * In the text/html I added the snippet to my form.
 *     ```
       <form action="https://www......." method="post" enctype="multipart/form-data">
       [wbcr_php_snippet id="290"]
       ```
   
 * In the snippet:
    `?><input type="hidden" name="Registered" value="<?php echo 
   date('l jS F Y'); ?>" />`
 * Notice how the line starts with a PHP closing tag.
 * My failed attempt looked like this
 * HTML:
 *     ```
       <form action="https://www......." method="post" enctype="multipart/form-data">
       <input type="hidden" name="Registered" value="[wbcr_php_snippet id="290"]" />
       ```
   
 * Snippet:
    `echo date('l jS F Y');`
 * It worked outside of quotes but not within.
 * I hope this helps.
    -  This reply was modified 7 years, 6 months ago by [visitmyzoo](https://wordpress.org/support/users/visitmyzoo/).
    -  This reply was modified 7 years, 6 months ago by [visitmyzoo](https://wordpress.org/support/users/visitmyzoo/).
    -  This reply was modified 7 years, 6 months ago by [visitmyzoo](https://wordpress.org/support/users/visitmyzoo/).
    -  This reply was modified 7 years, 6 months ago by [visitmyzoo](https://wordpress.org/support/users/visitmyzoo/).
    -  This reply was modified 7 years, 6 months ago by [visitmyzoo](https://wordpress.org/support/users/visitmyzoo/).
 *  Plugin Author [webcraftic](https://wordpress.org/support/users/webcraftic/)
 * (@webcraftic)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/issue-with-href/#post-10772896)
 * Hi, guys
 * To use shortcodes inside html attributes, you must escape double quotes, and 
   it is better to use single quotes. Example:
 * `<a title="altphone" href="tel:[wbcr_php_snippet id='3227']">Call me</a>`
 * Do not forget to leave your review about the plugin, it will allow us to make
   it better and more stable!
 * Best regards, Alex

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Issue with Href’ is closed to new replies.

 * ![](https://ps.w.org/insert-php/assets/icon-256x256.gif?rev=3475630)
 * [Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts](https://wordpress.org/plugins/insert-php/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [webcraftic](https://wordpress.org/support/users/webcraftic/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/issue-with-href/#post-10772896)
 * Status: resolved