0

i have this problem i have this variable
$title=J1. Tsalgatidou, A., " Modeling and Animating Information Systems Dynamics " , Information Processing Letters 36, 1990, 123-127.
and then i do this

$more_button='  <input type="button" id="button_help1"  value="Summary" onClick="window.location=\'some_infos_research_en.php?title='.$title.'\'">
				<input type="button" id="button_help1"  value="Full description" onClick="window.location=\'upload/publications/en/'.$file.'\'">';

but when i echo $more_button the button summary doesn't work. I know that the problem is with the " that variable $title has but how i can bypass this problem?
thank you very much

2
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by edwinhermann
0

You have to replace $title with htmlspecialchars($title) when you output.

i.e.:

$more_button='  <input type="button" id="button_help1"  value="Summary" onClick="window.location=\'some_infos_research_en.php?title='.htmlspecialchars($title).'\'">
				<input type="button" id="button_help1"  value="Full description" onClick="window.location=\'upload/publications/en/'.$file.'\'">';
0

thank you and another question the space is &nbsp; Do you know what code is for enter? Thank you very much

0

thank you and another question the space is &nbsp; Do you know what code is for enter? Thank you very much

<br>

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.