Hi
I have a normal ajax-function that works fine. It executes with this jquery-code in the template:
<a href="#" onclick="jQuery('#ajaxContent').load('http://localhost:8888/mysite/kontakt/erstatBillede/299'); return false;">
And the php-code also works fine:
function erstatBillede()
{
if($this->isAjax)
{
$BilledeID = Director::urlParam("ID");
$Billede = DataObject::get_one("BilledeObject", "BilledeID = $BilledeID");
return $Billede->renderWith("ajaxSnippet");
}
else
{
return Array();
}
}
And at last the code for the ajaxSnippet:
<% control Billede %>
<a href="$URL" class="group" title='$Title' rel="galleri">
<img class="thumb" src="<% control SetWidth(360) %>$URL<% end_control %>" alt='$Title'/>
</a>
<% end_control %>
$HTMLBeskrivelse
Now the problem is the HTMLTextfield: $HTMLBeskrivelse - this is plain html-code made in a SimpleTinyMCEField in an object powered by the DataObjectManager module. All of this also works fine, except when I use special characters like æ, ø and å in danish.
I've checked my database and it uses UTF-8 just like the html-template, so I guess that shouldn't be the problem.
If I change $HTMLBeskrivelse from "HTMLTextfield" to "Textfield" then I get raw html code out into the template. For some reason it just doesn't work as html-text.
I've also done a ContentNegotiator::disable(); in _config.php, but this doesn't make any difference.
Can anyone help?