• Resolved caravanguard

    (@caravanguard)


    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)
  • 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 6 years, 1 month ago by visitmyzoo.
    • This reply was modified 6 years, 1 month ago by visitmyzoo.
    • This reply was modified 6 years, 1 month ago by visitmyzoo.
    • This reply was modified 6 years, 1 month ago by visitmyzoo.
    • This reply was modified 6 years, 1 month ago by visitmyzoo.
    Plugin Author webcraftic

    (@webcraftic)

    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.