Gossamer Forum
Home : Products : Others : Fileman :

TEXTAREA

Quote Reply
TEXTAREA
Every time I edit a page or a script that contains </textarea> it gets changed to </TEXT-AREA>

How can I stop that from happening and why is that the only tag that gets changed?

Quote Reply
Re: TEXTAREA In reply to
may be because of that code in 'fileman.cgi':
-------------------------------
...
if (&exists($fullfile)) {
open (DATA, "<$fullfile") or &cgierr ("Can't open '$fullfile'\nReason: $!");
$lines = join ("", <DATA>);
$lines =~ s/<\/TEXTAREA/<\/TEXT-AREA/ig;
close DATA;
--------------------
otherwise any </textarea> tag from your file (contained in $lines buffer) will terminate
the following string from 'fileman.cgi':
...
<textarea name="data" rows=15 cols=60>$lines</textarea>
...

thus your FileManager's display will be corrupted by html_file being edited

i guess must be some other way of editing a file, may be using JavaScript pop-up?

Quote Reply
Re: TEXTAREA In reply to
You can change the following line
$lines =~ s/<\/TEXTAREA/<\/TEXT-AREA/ig;
to
$lines =~ s/\&/\&amp;/ig;
$lines =~ s/\<\/(TEXTAREA)\>/\&lt;\/$1\&gt;/ig;

That should solve your problem.