Welcome Guest, Not a member yet? Register   Sign In
how to post special character?
#1

[eluser]Tống Kiện Phi[/eluser]
My code in the attachments image, because i can not post this code to forum, forum have same bugs in my case.

when i submit content in attachment image to insert to database, i got this result:
Code:
sprintf('d',1);
sprintf('d',1);

I don't know why Sad
#2

[eluser]InsiteFX[/eluser]
php net sprintf manual
#3

[eluser]Tống Kiện Phi[/eluser]
Oh my god ... what i mean not how to use that function ... haizz .. ii want to insert content in attachments file into database, but when i submit form, i got this result

sprintf('d',1);
sprintf('d',1);

It's wrong, content don't look attachments file
#4

[eluser]Sky Warden[/eluser]
Can you please provide us with more information? Please tell us what do you want to do, how do you do it at the moment, and the error.

It's also a good idea to post the codes related to your need, so we can analyze it. Wink
#5

[eluser]Tống Kiện Phi[/eluser]
forum have same bug in my case, so you can see my clip to understand what i mean:

Link Youtube: http://www.youtube.com/watch?v=xeIPzea1U...e=youtu.be
Link my website: http://tongkienphi.com/clip/error.html

Or you can test with CI new version:
Step 1: Download CI new version.
Step 2: Open application/views/welcome_message.php and paste this code:
Code:
<form method="post">
   <textarea  200px; height: 100px;" name="code"></textarea>
   <input type="submit" name="submit" value="submit" />
  </form>
Step 3: Open application/controllers/welcome.php and paste this code:
Code:
public function index()
{
  $post = $this->input->post();
  echo $post['code'];
  $this->load->view('welcome_message');
}
Step 4: run http://localhost/ci and paste this code in my clip and then submit
#6

[eluser]TheFuzzy0ne[/eluser]
No, it's not a bug. That's to do with XSS filtering, which is to be expected.

The XSS filter has been kept as simple as possible, which is why, occasionally, you don't get the result you expect when you post code. I'm sure they could expand on it, but for the majority of posts, it's very effective.

If you're having trouble posting on here, you could always post your code at pastebin.com and link to that.

So now that's cleared up, what can we do for you?
#7

[eluser]Tống Kiện Phi[/eluser]
But in the config file, i set

$config['global_xss_filtering'] = FALSE;

Why CI auto clear it? i writed the web app to save good php or other source code to use in the future, so i need to insert data into database exactly, how to completed turn off it.

Sorry, my english is not good
#8

[eluser]greedyman[/eluser]
[quote author="Tống Kiện Phi" date="1364132182"]But in the config file, i set

$config['global_xss_filtering'] = FALSE;

Why CI auto clear it? i writed the web app to save good php or other source code to use in the future, so i need to insert data into database exactly, how to completed turn off it.

Sorry, my english is not good[/quote]

I agree with TheFuzzy0ne. To do what you want, you must set $config['global_xss_filtering'] = TRUE;
#9

[eluser]Tống Kiện Phi[/eluser]
set $config[‘global_xss_filtering’] = TRUE; still not work Sad

most of the first character is % not work too, but i have some question when i post some data, it's auto convert to another value, example here http://pastebin.com/zz18Ngya

u can enter that values and submit, let me test this forum

#4
45
E6
V7
#10

[eluser]Tống Kiện Phi[/eluser]
it's auto convert to #4, 45, E6 and V7




Theme © iAndrew 2016 - Forum software by © MyBB