Support » How-To and Troubleshooting » help with funky backslash problem

help with funky backslash problem

  • Ok…at the bottom of this site http://manymutts.com in the client testimonial area you will see that there are backslashes appearing before the quotes. I can’t seem to understand what is causing that.

    That area of text is controlled by a theme function page. That section is as follows to have a editable content area:

    			<th><label for="blurb5_enable">Display Fourth Homepage Blurb (Testimonials Quote)</label></th>
    				<select name="blurb5_enable" id="blurb5_enable">
    					<option value="yes" <?php if(get_option('boldy_blurb5_enable') == 'yes'){?>selected="selected"<?php }?>>Yes</option>
    					<option value="no" <?php if(get_option('boldy_blurb5_enable') == 'no'){?>selected="selected"<?php }?>>No</option>
    				</select><br />
                    <em>If "Yes" is selected and text field is empty, the blurb wont appear</em>
    		<tr valign="top">
    			<th scope="row"><label for="blurb5_text">Blurb Text</label></th>
    				<textarea name="blurb5_text" id="blurb5_text" rows="3" cols="70" style="font-size:11px;"><?php echo stripslashes(get_option('boldy_blurb5_text')); ?></textarea>

    The home page that receives the input is as follows:

    <?php if(get_option('boldy_blurb5_enable')=="yes" && get_option('boldy_blurb5_text')!=""){ ?>
    	   <div id="blurb5">
    		<div id="innerBlurb5">
    				echo get_permalink(get_option('boldy_blurb5_page'));
    				echo get_option('boldy_blurb5_link');
    			} ?>
    			<?php echo get_option('boldy_blurb5_text'); ?>
    		</div><!--END OF INNER BLURB5 -->
    	   </div><!-- END OF BLURB5 -->
    	   <?php }?><!-- END FIFTH BLURB -->

    Any suggestions??

Viewing 4 replies - 1 through 4 (of 4 total)
  • Krishna



    I don’t see anything as you say. Clear cache and check again.



    That’s standard PHP escaping for database values. What you need ot do is use strip_slashes() to remove the slashes.

    echo strip_slashes (get_option('boldy_blurb5_link'));

    Yeah, I’m still relatively new to PHP but the only documentation I found was from 2009.

    Are you sure it’s strip_slashes and not stripslahes?

    Cool…appears to work with stripslashes, the underscore returned a fatal error.

    thanks for the help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘help with funky backslash problem’ is closed to new replies.