mot erpi
mot erpi

Reputation: 1

Multiple doublequotes in input value

I want to ask if it is possible to add multiple double quotes to the input value, like this:

<input value= "<iframe src="http://xxx.xx/embed?t=<?php the_title(); ?>" 
width='640' height='360'
allowscriptaccess='always' allowfullscreen='true'
scrolling='no' frameborder='0'></iframe>"

So, the whole <iframe> element is wrapped within double quotes, just as the value of the src attribute (the URL), but the URL will not be included in value.

Can this be achieved?

Upvotes: 0

Views: 29

Answers (1)

Praveen Kumar
Praveen Kumar

Reputation: 2408

You can try escaping double quotation with backslash..... For more info visit How to properly escape quotes inside html attributes?

<input value= "<iframe src=&quot;http://xxx.xx/embed?t=<?php the_title(); ?>&quot; 
width=&quot;640&quot; height=&quot;360&quot;
allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot;
scrolling=&quot;no&quot; frameborder=&quot;0&quot;></iframe>"

Upvotes: 1

Related Questions