evaluating software, some problems.
evaluating software, some problems.
Hello,
We are evaluating conpresso software for further use, but we are running into a problem. We are trying to type in HTML code into the wysiwig editor, but it is not possible. We want to show examples of HTML code to our readers, like this:
To make a link, type in this:
<code>
<a href="link">Link</a>
</code>
But we cannot see the code because it interprets the code into a link. Please advise, we are trying version 3.4.5
Thanks.
shuser.
We are evaluating conpresso software for further use, but we are running into a problem. We are trying to type in HTML code into the wysiwig editor, but it is not possible. We want to show examples of HTML code to our readers, like this:
To make a link, type in this:
<code>
<a href="link">Link</a>
</code>
But we cannot see the code because it interprets the code into a link. Please advise, we are trying version 3.4.5
Thanks.
shuser.
-
- ConPresso-Checker
- Beiträge: 128
- Registriert: 01.01.1970 02:00
Re: evaluating software, some problems.
Hello shuser,
try to disable the editor in the rubric-config, because MS ActiveX-Editor-Control change the text.
I try the following tags in the normal text input field:
<plaintext>
<a href="http://www.conpresso.de">Conpresso</a>
</plaintext>
and it works.
bye Ralf
try to disable the editor in the rubric-config, because MS ActiveX-Editor-Control change the text.
I try the following tags in the normal text input field:
<plaintext>
<a href="http://www.conpresso.de">Conpresso</a>
</plaintext>
and it works.
bye Ralf
-
- ConPresso-Entwickler
- Beiträge: 1748
- Registriert: 01.01.1970 02:00
- Hat sich bedankt: 81 Mal
- Danksagung erhalten: 133 Mal
Re: evaluating software, some problems.
I don't think it's the ActiveX thats making problems there... if you type a the tag-symbols < > there they get converted by the ActiveX to
<a href="foobar" >
You can see this if you press the button for the html-code.
If you are not using the WYSIWYG editor you might have to replace the < > with < > yourself.
Balu
PS: I'm sorry, I just checked and the code really get's converted somewhere. I am going to check the conpresso code that might do this.
Post Edited (10-01-03 00:13)
<a href="foobar" >
You can see this if you press the button for the html-code.
If you are not using the WYSIWYG editor you might have to replace the < > with < > yourself.
Balu
PS: I'm sorry, I just checked and the code really get's converted somewhere. I am going to check the conpresso code that might do this.
Post Edited (10-01-03 00:13)
Bartels.Schöne
ConPresso Support & Development
ConPresso Support & Development
-
- ConPresso-Checker
- Beiträge: 128
- Registriert: 01.01.1970 02:00
Re: evaluating software, some problems.
Hello Balu,
i've test it again.
It is a little bit funy because everything after the <plaintext> starttag was displayed as Plaintext. It seems, that the </plaintag> endtag doesn't work .
SELFHTML recommed not use the <plaintext> tag, better is the <pre> tag.
But <pre> display a link and not htmlcode.
Post Edited (10-01-03 00:20)
i've test it again.
It is a little bit funy because everything after the <plaintext> starttag was displayed as Plaintext. It seems, that the </plaintag> endtag doesn't work .
SELFHTML recommed not use the <plaintext> tag, better is the <pre> tag.
But <pre> display a link and not htmlcode.
Post Edited (10-01-03 00:20)
Re: evaluating software, some problems.
Thanks for the replies guys. I know, it's a wierd problem.
If I save the article, and go check MySQL, it displays perfectly. I checked straight from the database, and I made a page with a simple query to that field and it displays perfectly. But when I go to modify the article, it queries the database for the text and the <> tags get converted.
The problem, I think, is that it gets converted by Conpresso when it gets queried.
I don't know very much about PHP, but this is an example, in the i_modify.php, it queries the database and then assigns the values like this:
(line 61 of _includesite/i_modify.php 3.4.5)
<code>
if ( $db->v("text_1") != '' ) { $text_1 = $db->v("text_1"); }
</code>
The ' $db->v("text_1") I think does some scrubbing to get rid of html tags, but I could be wrong.
I will try the plaintag, maybe I can make that work.
If I save the article, and go check MySQL, it displays perfectly. I checked straight from the database, and I made a page with a simple query to that field and it displays perfectly. But when I go to modify the article, it queries the database for the text and the <> tags get converted.
The problem, I think, is that it gets converted by Conpresso when it gets queried.
I don't know very much about PHP, but this is an example, in the i_modify.php, it queries the database and then assigns the values like this:
(line 61 of _includesite/i_modify.php 3.4.5)
<code>
if ( $db->v("text_1") != '' ) { $text_1 = $db->v("text_1"); }
</code>
The ' $db->v("text_1") I think does some scrubbing to get rid of html tags, but I could be wrong.
I will try the plaintag, maybe I can make that work.
Re: evaluating software, some problems.
Hi Again
I disabled the editor in the category and I can now paste code and it appears in the article. I guess I will have to use this as a workaround until I can figure out how to fix it.
shuser
I disabled the editor in the category and I can now paste code and it appears in the article. I guess I will have to use this as a workaround until I can figure out how to fix it.
shuser
-
- ConPresso-Entwickler
- Beiträge: 1748
- Registriert: 01.01.1970 02:00
- Hat sich bedankt: 81 Mal
- Danksagung erhalten: 133 Mal
Re: evaluating software, some problems.
Hi SHuser,
I've found two places that effect this behaviour:
./_include/select_db.php
at the end of this file there is a block of three if statements (one for $db_html_1, $db_html_2 and $db_html_3). You can comment the complete block using /* at the beginning and */ at the end so it looks like:
/*
if ( $db_html_1 == 1 )
{
[...]
$output_text_3 = ereg_replace ( """, "\"", $output_text_3);
}
*/
./_include/edit_text.php
This file contains a block right at the beginning where $text_value gets modified with many modifications. You should comment the complete block out like above:
/*
$text_value = ereg_replace ( ">", ">", $text_value);
[...]
$text_value = ereg_replace ( "'", "'", $text_value);
*/
I am not yet sure wether this creates any other problems as I did not have the time to check it carefully enough. So I'd love to hear if you experience any problems after changing those lines.
I am about to look deeper at it to find out if it is still an old part of code that got left from days where we did not have a WYSIWYG-editor but had to type html into the textfields manually.
Balu
I've found two places that effect this behaviour:
./_include/select_db.php
at the end of this file there is a block of three if statements (one for $db_html_1, $db_html_2 and $db_html_3). You can comment the complete block using /* at the beginning and */ at the end so it looks like:
/*
if ( $db_html_1 == 1 )
{
[...]
$output_text_3 = ereg_replace ( """, "\"", $output_text_3);
}
*/
./_include/edit_text.php
This file contains a block right at the beginning where $text_value gets modified with many modifications. You should comment the complete block out like above:
/*
$text_value = ereg_replace ( ">", ">", $text_value);
[...]
$text_value = ereg_replace ( "'", "'", $text_value);
*/
I am not yet sure wether this creates any other problems as I did not have the time to check it carefully enough. So I'd love to hear if you experience any problems after changing those lines.
I am about to look deeper at it to find out if it is still an old part of code that got left from days where we did not have a WYSIWYG-editor but had to type html into the textfields manually.
Balu
Bartels.Schöne
ConPresso Support & Development
ConPresso Support & Development
Re: evaluating software, some problems.
Thanks!!! That was very helpful of you balu, I appreciate it. I will give it a shot, hopefully everything works in regression testing.
Re: evaluating software, some problems.
Balu,
I commented out those lines. Strangely, it had no effect. The problem still seems to be there, unfortunately
I will try again and see what happens.
thanks for your help.
SHuser
I commented out those lines. Strangely, it had no effect. The problem still seems to be there, unfortunately
I will try again and see what happens.
thanks for your help.
SHuser
Re: evaluating software, some problems.
Ok, I figured it out. But it only works when the editor is activated.
I found the line in a file called _include/form.php
$text_1 = ereg_replace ( "<", "<", $text_1);
$text_1 = ereg_replace ( ">", ">", $text_1);
$text_2 = ereg_replace ( "<", "<", $text_2);
$text_2 = ereg_replace ( ">", ">", $text_2);
$text_3 = ereg_replace ( "<", "<", $text_3);
$text_3 = ereg_replace ( ">", ">", $text_3);
When I commented this out, it worked. I only needed to comment out $text_2 which is the Article details field.
But when I de-activate the editor, conpresso still converts > and < to < > when the is queried on the article edit page.
for example, with the editor deactivated, I inserted the following example text.
<body blah blah>
If I submit the article ONCE, it works fine. But if I call it up again, the text area now shows:
<body blah blah>
and if I submit THAT, it interprets it as HTML of course.
So I have a temporary workaround.
Shuser.
I found the line in a file called _include/form.php
$text_1 = ereg_replace ( "<", "<", $text_1);
$text_1 = ereg_replace ( ">", ">", $text_1);
$text_2 = ereg_replace ( "<", "<", $text_2);
$text_2 = ereg_replace ( ">", ">", $text_2);
$text_3 = ereg_replace ( "<", "<", $text_3);
$text_3 = ereg_replace ( ">", ">", $text_3);
When I commented this out, it worked. I only needed to comment out $text_2 which is the Article details field.
But when I de-activate the editor, conpresso still converts > and < to < > when the is queried on the article edit page.
for example, with the editor deactivated, I inserted the following example text.
<body blah blah>
If I submit the article ONCE, it works fine. But if I call it up again, the text area now shows:
<body blah blah>
and if I submit THAT, it interprets it as HTML of course.
So I have a temporary workaround.
Shuser.