Welcome Guest, Not a member yet? Register   Sign In
Problem with POST values
#1

[eluser]dandys997[/eluser]
Hi,
I've got a problem with fetching POST variables' values using CodeIgniter Input Class.

I need to send a full link to a photo data via one of form fields.

But when I use $this->input->post("field_name"), I get:
Code:
<span class="photos"><a href="../photos/panda3.jpg"><img src="../photos/panda3_thumb.jpg" /></a></span>

What should I do to avoid this behaviour of CodeIgniter? I've tried: $this->input->post("field_name", false), but unsuccessfull.

Thanks in advance for help!
#2

[eluser]spaquet[/eluser]
Have you tried adding
Code:
&lt;?php echo base_url();?&gt;
(do not forget to load the url module before.
#3

[eluser]dandys997[/eluser]
It's impossible in this case. The field will be used to send many kind of data (both absolute and relative links to resources).
#4

[eluser]Johnny Freeman[/eluser]
would you mind posting your form html code? and also, can you elaborate a little more on what you're trying to accomplish? thanks
#5

[eluser]dandys997[/eluser]
I think it could be a bug of CodeIgniter. I reviewed HTTP headers sent by a browser and there's a full text sending to a controller. Problem appears at input class. Maybe it's a XSS filter? But I don't know, how to disable it.

Form HTML code is:

&lt;form action="http://localhost:8080/domweselny/panel/add" method="post" accept-charset="utf-8" enctype="multipart/form-data"&gt;
Code:
<table border="0" cellpadding="4" cellspacing="0">
<tbody>
<tr>
<td>Tytuł:</td><td>&lt;input type="text" name="title" value=""  /&gt;&lt;/td></tr>
<tr>
<td>Treść:</td><td>&lt;textarea name="content" cols="90" rows="12" id="input"&gt;&lt;/textarea></td></tr>

<tr>
<td>Załącznik:</td><td>&lt;input type="file" name="userfile" value=""  /&gt;&lt;/td></tr>
</tbody>
</table>&lt;input type="submit" name="submit" value="Dodaj"  /&gt;&lt;input type="reset" name="reset" value="Wyczyść"  />&lt;/form&gt;
By a field named "content" user sends a content (including absolute link to this server's resources), it's binded with a CLEditor jQuery script.
#6

[eluser]mestresan[/eluser]
How can I POST textarea with HTML content ?
Sometimes I need to use "&lt;iframe&gt;, "embed", etc .. but "<" are converted to entities ....
HOW can I disable this function in this especific field?
#7

[eluser]CroNiX[/eluser]
just run html_entity_decode() on it.
$content = html_entity_decode($this->input->post('content'));
#8

[eluser]mestresan[/eluser]
I found the problem ....
the active record BD escape many html tags, remove some.. and some "<" are converted to entities.

How can I allow specific tags ?




Theme © iAndrew 2016 - Forum software by © MyBB