Spinal
MB Enthusiast
- Joined
- Sep 14, 2004
- Messages
- 4,806
- Location
- between Uxbridge and the Alps
- Car
- x254, G350, Duster, S320, Mach1, 900ss and a few more
Greetings! I have been cracking my head on a site I'm working on, then I realised, this entire forumn is written in PHP so someonemight be able to help me. I've been trying to open a file (containing html), output the contents as they would be see (preview style), then output the contents with html tags in a text box (kinda like here). Thus allowing the user to modify the file he saw above, then he can click Submit which uses POST to send it to a function save, which just writes it all to a file. Easy... not
When the user enters ", ', or /, the script puts a / before any of those, so if a file is modified multiple times, you end up with ///////////" . Which gets quite annoying, not too mention messes up any img tags that one might wish to put.
Any idea how I can force php to remove all those escape characters before displaying it? I have tried htmlentities, but to no avail.
Thanks,
Michele
When the user enters ", ', or /, the script puts a / before any of those, so if a file is modified multiple times, you end up with ///////////" . Which gets quite annoying, not too mention messes up any img tags that one might wish to put.
Any idea how I can force php to remove all those escape characters before displaying it? I have tried htmlentities, but to no avail.
Thanks,
Michele