Jump to content

Special character stopping writelog function.


coppers

Recommended Posts

I'm having problems with a writelog script and special html characters or just special characters in general, I don't know what at this time, what is causing it to error.

 

Does anyone know what special html characters (such as u2034 stuff and ♥) or other characters can error out writelog on a utf-8 encoded page?  I have apos, quotes, and html brackets filtered already.

Link to comment
Share on other sites

Trying to create a blacklist of unsupported characters is not a good approach, IMHO, as there is always something you forget about. I think a better approach is to have a white list of supported characters. You can then strip out all unsupported characters with a simple regex expression.

Link to comment
Share on other sites

You need to provide the code for the writelog function if you want some help with it.

 

As to special characters to be allowed. Do you want to allow the heart symbol (♥), the inifinity symbol (∞), sigma (Σ) or how about the control characters such as new line, page break, etc. All of those (and many, many more) might be causing your problems. Without knowing exactly what the input is that is breaking the function it is impossible to know what the problem is - or what other characters might break it. Basically if you fix it for the known problem characters now, there is no guarantee there are not others that will break it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.