![]() |
Ajax - Edit-in-place prob ( html )
Hi,
I have a code which helps me to edit a text and save it to database. the files I have: articles.html PHP Code:
prototype.js and articles.php which conatin the orders to save the text in the database. the problem is I don't want any body to enter html code, I mean if some one edit the text and write: <b>test</b> it should give him this: <b>test</b> and NOT: test so how to do that? :confused: |
|
Thanks MoT3rror,
but this is for the php file. I need it for the javascript! --------------- Added [DATE]1214975648[/DATE] at [TIME]1214975648[/TIME] --------------- ok I know I should use escapeHTML() but how to add that to this code? Code:
<script type="text/javascript"> |
You should ALWAYS sanitize data server-side. That means, you should run htmlspecialchars() in your PHP script. Sanitizing client-side (ie. with Javascript) can be easily bypassed.
|
All times are GMT. The time now is 07:39 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|