[jQuery] Escape HTML Entities
Hej everyone, i got some problems on html entities within my script.
I am kinda building a CMS, but it is for a swedish website, so they
use lots and lots of öäë.
Now I gather my input fields from the document and post it to a php
file like this:
----------------------------------------------------------
$(".createpreview").click(function()
{
$("#previewform").children().each(function()
{
$.get("import/createpreview.php", { fieldname: $
(this).attr("name"), text: $(this).attr("value") });
});
}
For instance i have an input field which says:
* Välkommen
but when sending the document created is
* GET http://localhost/cms/import/createpreview.php?fieldname=title&text=V%C3%A4llkommen
(281ms)
My database displays:
* vã¤llkommen
And my fetched result back into the page displays:
* v�llkommen
How can i solve this problem? And where is my capital going to!? I
know about html entities and html enities converters like
http://www.w3clubs.com/htmlentities.php but when i apply such html
entity converter my results turn into:
* vällkommen
which is near what i want it to be, but still no caps and i want it
just to be
* Vällkommen
could someone help me out with a quick solution?