Welcome Guest, Not a member yet? Register   Sign In
Problems submiting rich text html special chars
#1

[eluser]Rubiz'[/eluser]
Hi there.

I'm submiting a form that has a hidden input, that retrieves data from a rich text editor. So, I have html tags, ' " ' chars, etc in the value of this input...

I'm trying after submit, in my post function, use functions like htmlentities(), htmlspecialchars() and urlencode(), but it crashes the application anyway. It returns me a blank page with any code.

My php log returns me Foundation\\Apache2.2\\htdocs\\villa_branca\\system\\libraries\\Input.php on line 855, referer: http://192.168.0.107/villa_branca/index.php/noticias
#2

[eluser]Dr.Dan[/eluser]
Have you tried addslashes()?
#3

[eluser]Rubiz'[/eluser]
Yes Sad

And I've tried too, before submit, javascript functions like encodeURI() and encodeURIComponent()...

I have other application without code igniter, where I use only htmlentities and it works :-\
#4

[eluser]xwero[/eluser]
I find it strange you get that input library error. The line is a call to the get_instance function.

What happens if you don't use input changing functions?
#5

[eluser]Rubiz'[/eluser]
I get the same error, and now I submited pure html codes, like <p> and &lt;style="font-weightConfusedtrong"&gt; things like that...

I dont know if it makes difference, but my encoding language is pt-br, brazilian portuguese...
#6

[eluser]Dr.Dan[/eluser]
Not sure, but you can try this



Code:
$data=$this->input->xss_clean($this->input->post('name'));
#7

[eluser]Rubiz'[/eluser]
I tried to use this, this way in my post array:
Code:
'materia'    => $this->input->xss_clean($this->input->post('rte1'))
I got the same blank page...

But a friend of mine told me to change this in config:
Code:
$config['global_xss_filtering'] = TRUE;
to false, in line 263. It works!!! He told me to pay attention if any other post function is affected in wrong way.

Now, u have a new bug to fix [Smile]
#8

[eluser]Peter Ivanov[/eluser]
[quote author="Rubiz’" date="1199730948"]I tried to use this, this way in my post array:
Code:
'materia'    => $this->input->xss_clean($this->input->post('rte1'))
I got the same blank page...

But a friend of mine told me to change this in config:
Code:
$config['global_xss_filtering'] = TRUE;
to false, in line 263. It works!!! He told me to pay attention if any other post function is affected in wrong way.

Now, u have a new bug to fix [Smile][/quote]


Hello i had the same problem and i fixed it by making this in config:
Code:
$config['global_xss_filtering'] = FALSE;




Theme © iAndrew 2016 - Forum software by © MyBB