Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2007-02-05 13:05:47

Guilherme Blanco
New member
Registered: 2007-02-05
Posts: 6

Xinha & PHP: Textarea is not posted to PHP script

Hello,

I am a PHP and JS developer, and a friend suggested me to use Xinha as a RTE in one application I'm currently working.

After download time, I setup the script into a form field (textarea) of an already working script. The editor displayed fine, without any problem.

Then I decided to apply a test and submit some contnet. The editor misteriously removed the index in the PHP script and broke the application.
After some JS code, I discovered that the textarea is still there in the form, and it's not removed. Debugging, I found that the textarea is not disabled (does not pass the value to PHP script) and has its value set to an empty string.

I decided to build a test sample, and it worked well, without any problem.

I do not have any other RTE associated in the same page, only one and I can assure the id is unique.
That's why I decided to post it here. Seems there's a weird behavior of Xinha that I extracted the minimum working example to you experience the same behavior I have here.

The example is not complete, I removed some filters, injections and exploit checkings. This is the minimum code I could extract to still reproduce the error.
The ZIP file is available here: http://blog.bisna.com/files/xinha.zip

To access the not-working example: http://.../fuck/Web/admin/page.php?view=link
To access the experimental working example (which shares the same JS files): http://.../fuck/Web/admin/t.php

Maybe you can experience a non-loaded Xinha. To fix, just put all the plugins inside the plugins folder. I removed some of them to reduce the ZIP size.

Waiting for any possible explanation and fix.


Best regards,

Guilherme Blanco - Web Developer
MSN: guilhermeblanco@hotmail.com
Mobile: +55 (16) 9166-6902
São Carlos - SP/Brazil

Offline

#2 2007-02-06 15:02:08

beanstalk
Xinha Community Member
Registered: 2007-02-06
Posts: 13

Re: Xinha & PHP: Textarea is not posted to PHP script

i just had a similar problem that i was able to fix after validating my html.  i had form tags that were not located properly.  hope this helps.

Offline

#3 2007-02-06 15:47:03

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Xinha & PHP: Textarea is not posted to PHP script

Sorry, I cannot reproduce your setting from the zip file without setting up a database. You should strip it down to just the HTML produced by the php and a target file that prints out the submited data

Offline

#4 2007-02-06 20:58:52

Guilherme Blanco
New member
Registered: 2007-02-05
Posts: 6

Re: Xinha & PHP: Textarea is not posted to PHP script

@beanstalk: Thanks... the error was that!


@ray: Really strange behavior. I modified the working example to do exactly what beanstalk suggested. I just moved the form tag to wrong place and the exmaple stopped working.


Thanks!

Offline

#5 2007-02-07 07:16:24

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Xinha & PHP: Textarea is not posted to PHP script

Well, valid HTML is of course a prmise

Offline

Board footer

Powered by FluxBB