Welcome Guest Search | Active Topics | Sign In | Register

Loading Editor with malformed HTML Options
Fernando De Gasperis
Posted: Thursday, December 4, 2008 12:52:00 PM
Rank: Newbie
Groups: Member

Joined: 12/4/2008
Posts: 5
Hello,

I am currently evaluating the EO.Web HTML editor control and I am ran into a problem that may prevent me from using this control altogether.

The problem happens whenever I load the control with html that is malformed. By' malformed' I mean that I have an open font tag (<FONT>)without a matching closing font tag (</FONT>).

So I set the html property of the control to a string containing the html, then I let the user edit its content (no problem so far; the control displays the html content just fine).

The problem starts when I try to extract the html from the control by reading the html property. The html I get back not only strips out anything outer than (and including) the <BODY> and this I can live with.

The real problem is that the control seems to duplicate the text immediately following the unclosed <FONT> tag.

QUESTIONS:
- Q1: Is this text duplication something I can stop from happening?
- Q2: Is chopping the BODY and outer tags a bug or expected behavior?
- Q3: Is there a way to prevent the editor control from reformatting / restructuring the HTML that was initially given?
- Q4: Is there a way of getting the raw (original) html that was fed to the control through the html property?

Thank you,

Fernando De Gasperis
eo_support
Posted: Thursday, December 4, 2008 1:09:40 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,096
Hi,

Thanks for posting in the forum. As to your questions:

1. The Editor always tries to produce valid and consistent HTML across different browsers. So when the input is invalid, it will always try to fix it up. It appears that it didn't do it right in your case though. However if you can post the malformed HTML, we will look into it and see if we can find out why the final output has duplicate text. Currently there is no option to turn the auto-fixup off. However we are certainly open to add such an option;

2. Chopping BODY and outer tags is the designed behavior. Most users use the editor to edit a HTML segment, such as a forum post, instead of a full HTML document. If you wish to have the body tag, you can get the HTML from the editor, then put body tag around it;

3. Please see #1;

4. No. If you wish to keep the raw HTML, you can keep it in somewhere else, for example, in your database, in the page view state, etc;

Hope this helps.

Thanks!
Fernando De Gasperis
Posted: Friday, December 5, 2008 3:06:01 PM
Rank: Newbie
Groups: Member

Joined: 12/4/2008
Posts: 5
Hello and thank you for clarifying the editor's behavior.

Here is the html that is causing the text duplication behavior.
The html below is malformed, in part, because it has some unclosed <font> tags.

These steps will show you how to reproduce the problem:

1 - Load the html below (assign the html below to the HTML property) on the EO.Editor;
2 - Retrieve the string value from the html property and re-assign it back to the same html property:

string s = editor1.html;
editor1.html = s;

3 - the new content shown in the control will have some repeated text which was not in the initial html.

Thank you,

Fernando De Gasperis

******************* ORIGINAL HTML *********************

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<title>Email_Template v2</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="600" align="center">
<tr>
<td><img src="http://www.sdlconnect2.com/sdparticipant/images2/emails/ulh_cap.gif" alt="" name="ulh_cap" width="7" height="17" border="0" id="ulh_cap" /></td>
<td class="top_bkg"><img src="http://www.sdlconnect2.com/sdparticipant/images2/emails/spacer.gif" alt="" name="top_bkg" width="586" height="17" border="0" id="top_bkg" /></td>
<td><img src="http://www.sdlconnect2.com/sdparticipant/images2/emails/urh_cap.gif" alt="" name="urh_cap" width="7" height="17" border="0" id="urh_cap" /></td>
</tr>
<tr>
<td class="lh_bkg"><img src="http://www.sdlconnect2.com/sdparticipant/images2/emails/spacer.gif" width="7" height="95" border="0" alt="" /></td>
<td>
<table width="600" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td><img name="ulh_hdr" src="http://www.sdlconnect2.com/sdparticipant/images2/emails/sd_hdr_logo.gif" width="156" height="85" border="0" id="ulh_hdr" alt="" /></td>
<td><img name="uc_hdr_spacer" src="http://www.sdlconnect2.com/sdparticipant/images2/emails/spacer.gif" width="53" height="85" border="0" id="uc_hdr_spacer" alt="" /></td>
<td><img name="focus_r1" src="http://www.sdlconnect2.com/sdparticipant/images2/emails/focus_r1.gif" width="9" height="85" border="0" id="focus_r1" alt="" /></td>
<td background="http://www.sdlconnect2.com/sdparticipant/images2/emails/hdr_image-gbi.jpg" width="462" valign="bottom"><table style="margin-bottom:3px; margin-left:9px">
<tr>
<td class="reverse_head">guiding behaviors inventory<span class="trademark">&trade;</span></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><img name="r2l_white_space" src="http://www.sdlconnect2.com/sdparticipant/images2/emails/spacer.gif" width="1" height="1" border="0" id="r2l_white_space" alt="" /></td>
<td colspan="2"><img name="hdr_r2_focus" src="http://www.sdlconnect2.com/sdparticipant/images2/emails/hdr_r2_focus-help.gif" width="391" height="23" border="0" id="hdr_r2_focus" alt="" /></td>
</tr>
</table>
</td>
<td class="rh_bkg"><img src="http://www.sdlconnect2.com/sdparticipant/images2/emails/spacer.gif" width="8" height="95" border="0" alt="" /></td>
</tr>
<tr>
<td class="lh_bkg"><img src="http://www.sdlconnect2.com/sdparticipant/images2/emails/spacer.gif" width="7" height="25" border="0" alt="" /></td> <td class="em_body"><p class="salutation">Dear {PARTICIPANTNAME},</p>
<p><font style="font-size: 9pt">This is a reminder that you still have not begun the Senn Delaney
Guiding Behaviors Inventory&#8482; process, designed to reflect PG&amp;E's values and provide you
with valuable feedback about how well you are perceived to represent those values. Please set up your
survey as soon as possible as there is a time limit for your respondents. Use the link below to access a
site to begin that process. </p>

<table class="highlight_note" width="50%"><tr><td>Your log in name is: {LOGINNAME}<br/> <br/>
You need this password to enter the site: {PASSWORD}<br/><br/>
<a class="brick" href="{SURVEYLINK}" onClick="return (false);">
Please click this link to access the survey
</a>
<p>Else</p><br>
<a class="brick" href="http://qa3web.sdlconnect.sdlcg.com/sdparticipant/logon/p_logon.aspx"> <font size = '2'>Abhi - Click on this link to go directly to the dashboard </font></a>


<p><b>Abhi's GBI participant reminder email for 12/03</b></p>
<p> Participant Name: {PARTICIPANTNAME}
<p> Relationship: {RELATIONSHIP}
<p> Activity end date:{ACTIVITYENDDATE}
<p> Activity due date {ACTIVITYDUEDATE}
<p> Company name: {COMPANYNAME}
<p> Session name: {SESSIONNAME}
<p> Session start date: {SESSIONSTARTDATE}
<p> Session end date: {SESSIONENDDATE}
<p> Leader name: {LEADERNAME}
<p> Consultant name: {CONSULTANTNAME}
<p> Leader Email: {LEADEREMAIL}
<p> Consultant Email: {CONSULTANTEMAIL}
<p> DOAMNAME/CONTACTINFO : {DOAMNAME/CONTACTINFO}
<p> Consultant 1/title : {CONSULTANT1/TITLE}
<P> Consultant 2/title : {CONSULTANT2/TITLE}
<p> Please take the survey by {ACTIVITYDUEDATE} </p>
</span></b></td>
</tr></table>
<p><font style="font-size: 9pt"><b>Whom to invite to provide feedback:</b> Invite your boss, peers and anyone
who reports directly to you to provide feedback by completing the Inventory; there is also an &quot;Other&quot;
category you can use for clients or for a specific group of co-workers. You should invite people who work
closely with you and/or have an experience of your business behavior. </p>
<p><font style="font-size: 9pt"><b>How to invite them:</b> Be sure to contact each of them personally
(face-to-face or by phone) to ask them to participate in the Guiding Behaviors Inventory&#8482; process.
Let them know that they will receive an invitation by email from you. The email&#8217;s subject line will be
&#8220;Requesting your support &#8211; Guiding Behaviors Inventory.&#8221; We have found that people
generally respond better if they are aware of the process before they receive the email invitation.</p>
<p><font style="font-size: 9pt">When you are ready to send the invitations, simply log on to the site
using the link and password above. You will need to enter email addresses of people you wish to invite.
The site will automatically send each person an invitation with a link and instructions for completing an
online survey. You can also print out paper surveys for anyone who does not have email.</p>
<p><font style="font-size: 9pt"><b>Filling out a survey on yourself:</b> After inviting your respondents,
you will have an opportunity to complete an online survey on yourself or to have the system send you a
reminder to complete it later.</p>
<p><strong>If you have any questions about the Guiding Behaviors Inventory&#8482;
process, please contact Senn Delaney at (xxx) xxx-xxxx. </strong>
</p>
<p> Regards,<br />
The Facilitator Team</p></td>

<td class="rh_bkg"><img src="http://www.sdlconnect2.com/sdparticipant/images2/emails/spacer.gif" width="7" height="25" border="0" alt="" /></td>
</tr>
<tr>
<td class="lh_bkg"><img src="http://www.sdlconnect2.com/sdparticipant/images2/emails/spacer.gif" width="7" height="26" border="0" alt="" /></td>
<td align="left" valign="top" style="background-color:#005595">
<table border="0" cellspacing="0" style="MARGIN-LEFT:18px;">
<tr>
<td class="copyright" align="left">&copy; 2005- Senn Delaney Leadership Consulting Group, LLC.<br />United States xxx.xxx.xxxx&nbsp;&#9474&nbsp;International +44 (0) 207 647 6060</td>
<td><img src="http://www.sdlconnect2.com/sdparticipant/images2/emails/sd_footer_logo.gif" width="175" height="42" alt="" style="margin-left:18px"></td>
</tr>
</table>
</td>
<td class="rh_bkg"><img src="http://www.sdlconnect2.com/sdparticipant/images2/emails/spacer.gif" width="7" height="26" border="0" alt="" /></td>
</tr>
<tr>
<td><img src="http://www.sdlconnect2.com/sdparticipant/images2/emails/blh_cap.gif" alt="" name="blh_cap" width="7" height="7" border="0" id="blh_cap" /></td>
<td class="bottom_bkg"><img src="http://www.sdlconnect2.com/sdparticipant/images2/emails/spacer.gif" width="586" height="7" border="0" alt="" /></td>
<td><img src="http://www.sdlconnect2.com/sdparticipant/images2/emails/brh_cap.gif" alt="" name="brh_cap" width="7" height="7" border="0" id="brh_cap" /></td>
</tr>
</table>
</body>
</html>




eo_support
Posted: Monday, December 8, 2008 7:35:03 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,096
Hi,

Thanks for the additional information. We are working on this issue and hopefully can post an update build that can handle malformed input correctly soon.

Thanks!
eo_support
Posted: Monday, December 8, 2008 6:21:00 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,096
Hi,

We have posted a new build that addressed this issue. Please check your private message to view the download location.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.