HTML import corrupting tags

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

HTML import corrupting tags

Levi Kendall
Hi all,

  I am trying to import html into a text field but there are tags
which are modified during the import.  This causes the field to
"roughly" represent the html but it's not truely representing what the
html is supposed to be.  When the text is then exported back to an
html file the end result does not match the data that was imported.
What I am looking for is if there is a way to stay more true to what
the original html data was between import, editing, and export.

My basic experiment html file looks as such:

<html><body>
Demo Html File
<blockquote>blockquote text</blockquote>
<table border=2>
        <tr>
                <td>cell 1 text</td>
                <td>cell 2 text</td>
        </tr>
</table>
</body></html>

Fairly basic, not too many things going on here, just a blockquote and
a table.  There are two different results I can get.  The first result
comes from just copying this when it is displayed in a browser and
pasting it into the field.  This results in the following in terms of
htmltext of the field:

<p>Demo Html File</p>
<p></p>
<p>    blockquote text</p>
<p></p>
<p>cell 1 text &#9;cell 2 text     </p>

This is "close" but not completely the same.  The second way I am
importing the file is to use set with the URL keyword, the commands
would look like:

answer file "Import HTML" filter with "HTML File,*.HTM,*.HTML"
set the htmltext of field "Demofield" to URL ("file:" & tFilename)

This results in the following exported data:

<p>Demo Html File</p>
<p></p>
<p>blockquote text</p>
<p></p>
<p>                          cell 1 text                 cell 2 text  
        </p>

So with the file just being imported and exported the blockquote is
not indented this time and the cells are separated (and indented now?)
by spaces instead of a tab character.

Is there any way to stay more true to what the HTML is during the
process?  Thanks.

-Levi
_______________________________________________
use-revolution mailing list
[hidden email]
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: HTML import corrupting tags

Jan Schenkel
--- Levi Kendall <[hidden email]> wrote:

> Hi all,
>
>   I am trying to import html into a text field but
> there are tags
> which are modified during the import.  This causes
> the field to
> "roughly" represent the html but it's not truely
> representing what the
> html is supposed to be.  When the text is then
> exported back to an
> html file the end result does not match the data
> that was imported.
> What I am looking for is if there is a way to stay
> more true to what
> the original html data was between import, editing,
> and export.
>
> [snip]
>
> Is there any way to stay more true to what the HTML
> is during the
> process?  Thanks.
>
> -Levi
>

Hi Levi,

Revolution fields only support a limited subset of the
HTML-specification -- it is aimed at providing a
convenient way to acces and modify styled text data,
not to serve as a browser control.
If you want to include a full browser control in your
projects, have a look at altBrowser, by Altuit:
<http://www.altuit.com/webs/altuit2/altBrowserCover/default.htm>

Hope this helped,

Jan Schenkel.

Quartam - Tools for Revolution
<http://www.quartam.com>

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


               
__________________________________
Discover Yahoo!
Find restaurants, movies, travel and more fun for the weekend. Check it out!
http://discover.yahoo.com/weekend.html 

_______________________________________________
use-revolution mailing list
[hidden email]
http://lists.runrev.com/mailman/listinfo/use-revolution