PDA

View Full Version : iRite Upload Double Quotes


mike325598
05-21-2009, 09:46 AM
I have uploading working within iRite. Once uploaded an I insert an image into the text area. I can add a border, select right justified to position the image.

When I insert, the image appears. Before submitting the form, the text appears as:

<img width="155" height="194" align="right" alt="" src="/userfiles/image/2009_Winner.jpg" />

After I submit, the content changes to:
<img width="&quot;155&quot;" height="&quot;194&quot;" align="&quot;right&quot;" alt="&quot;&quot;" src="&quot;/userfiles/image/2009_Winner.jpg&quot;" />

However, the inserts double quotes around everything. If I edit the image, an additional set of quotes appears. What could be inserting the extra set of quotes?

I'm using DataAssist to make the update.

Thank you

Ray Borduin
05-21-2009, 10:14 AM
DataAssist added a function to encode the quotes so that it would work properly inside a regular form field.

Now you are using iRite and don't want the value encoded, so update the default value and remove the formatting function that is encoding the quotes. You will see it there in the default value and it should be easy to remove.

mike325598
05-22-2009, 07:03 PM
DataAssist added a function to encode the quotes so that it would work properly inside a regular form field.

Now you are using iRite and don't want the value encoded, so update the default value and remove the formatting function that is encoding the quotes. You will see it there in the default value and it should be easy to remove.

I actually did this before checking back in and it fixed the problem. I kept getting an additional set of quotes after each submission. Thanks for your reply.

ss320646
08-19-2009, 07:51 AM
I have the same issue. I too have made the change as illustrated below.

My update initial field value is: <?php echo $row_WADApage_content['content']; ?>

This is the code I'm inserting.

<p><a href="#"><img height="71" width="222" alt="Appointment" src="images/appointment.gif" /></a></p><h3>

And this is the result.
<p><a href="&quot;#&quot;"><img height="&quot;71&quot;" width="&quot;222&quot;" src="&quot;images/appointment.gif&quot;" alt="&quot;Appointment&quot;" /></a></p><h3>

Thanks,

Ray Borduin
08-19-2009, 08:19 AM
DataAssist added a function to encode the quotes so that it would work properly inside a regular form field.

Now you are using iRite and don't want the value encoded, so update the default value and remove the formatting function that is encoding the quotes. You will see it there in the default value and it should be easy to remove.

ss320646
08-19-2009, 09:15 AM
I have removed the formatting of the quotes. This is what I have.

<?php
// WebAssist iRite: Rich Text Editor for Dreamweaver
$WARichTextEditor_1 = CreateRichTextEditor ("content", "../WA_iRite/", "100%", "600px", "Custom", "../custom/page_content_Update_content4.js", "".$row_WADApage_content['content'] ."");
?>

Thanks,

Ray Borduin
08-19-2009, 09:35 AM
That should work now. Remove the double quotes added previously and it shouldn't add them any more.

ss320646
08-19-2009, 11:06 AM
It still adds them after the change.

Ray Borduin
08-19-2009, 12:13 PM
I have created an incident so that somebody can look into this further with you. It appears it should be working, so somebody may have to help you debug the problem and when it occurs. Have you uploaded your files?

To view and respond to the incident go to: http://www.webassist.com/mywebassist/supporthistory.php

purgero
09-14-2009, 07:54 PM
Please don't assume that everyone knows what you guys are talking about. I don't, and need a little better guidance as to where to make these changes.

I originally thought it was because my customer was pasting from Microsoft Word. When I pasted from Notepad, updated it, and refreshed the page in the browser, it worked. If I refreshed it a second or third time, I get links with double quotes.

I found where the other guy showed the text from his web page, and here's mine:

Dim WARichTextEditor_1 : Set WARichTextEditor_1 = CreateRichTextEditor ("Column1", "../WA_iRite/", "100%", "400px", "Default", "../custom/HomePage_Update_Column11.js", "" & cStr(Replace((WADAHomePage.Fields.Item("Column1").Value)&"", """", "&quot;")) & "")
%>

So, where do I change the defaults?

Thanks.
Paul

Ray Borduin
09-15-2009, 07:21 AM
This code will replace the quotes:

Replace((WADAHomePage.Fields.Item("Column1"). Value)&"", """", "&quot;")

so if you replace it with:

WADAHomePage.Fields.Item("Column1"). Value

the quotes won't be replaced

purgero
09-15-2009, 08:21 AM
Ray,

I replaced the code as you suggested...the code now looks like this:

Dim WARichTextEditor_1 : Set WARichTextEditor_1 = CreateRichTextEditor ("Column1", "../WA_iRite/", "100%", "400px", "Default", "../custom/HomePage_Update_Column11.js", "" & cStr(WADAHomePage.Fields.Item("Column1"). Value) & "")

I'm still having the same problems. Once you update it, the page looks fine...but if you refresh the page, the quotes are added.

I am also curious as to why it might change. I haven't touched this site in months, and the customer has been updating it.

Please advise.
Thanks

Ray Borduin
09-15-2009, 11:46 AM
That code looks correct. The only other place you may have issues is in the update server behavior itself. What do you have the update column set to?

purgero
09-15-2009, 12:05 PM
Ray,

Here is the code for the Update (I hope it's the right one)...how does it look?

<%
' WA Application Builder Update
if (cStr(Request.Form("Update.x")) <> "") then
WA_connection = MM_connSilver_STRING
WA_table = "HomePage"
WA_redirectURL = "HomePage_Detail.asp?ID=" & cStr(cStr(Request.Form("WADAUpdateRecordID"))) & ""
WA_keepQueryString = false
WA_indexField = "ID"
WA_fieldNamesStr = "Column1|Column2"
WA_fieldValuesStr = "" & cStr(cStr(Request.Form("Column1"))) & "" & "|" & "" & cStr(cStr(Request.Form("Column2"))) & ""
WA_columnTypesStr = "',none,''|',none,''"
WA_comparisonStr = " LIKE | LIKE "
WA_fieldNames = Split(WA_fieldNamesStr,"|")
WA_fieldValues = Split(WA_fieldValuesStr,"|")
WA_columns = Split(WA_columnTypesStr,"|")
WA_comparisions = Split(WA_comparisonStr, "|")

WA_where_fieldValuesStr = "" & cStr(cStr(Request.Form("WADAUpdateRecordID"))) & ""
WA_where_columnTypesStr = "none,none,NULL"
WA_where_comparisonStr = "="
WA_where_fieldNames = Split(WA_indexField,"|")
WA_where_fieldValues = Split(WA_where_fieldValuesStr,"|")
WA_where_columns = Split(WA_where_columnTypesStr,"|")
WA_where_comparisions = Split(WA_where_comparisonStr, "|")


updateParamsObj = WA_AB_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, -1)
WhereObj = WA_AB_generateWhereClause(WA_where_fieldNames, WA_where_columns, WA_where_fieldValues, WA_where_comparisions)

set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = WA_connection
MM_editCmd.CommandText = "UPDATE " & WA_table & " SET " & updateParamsObj(3) & " WHERE " & WhereObj & ""
MM_editCmd.Execute()
MM_editCmd.ActiveConnection.Close()
if (WA_redirectURL <> "") then
if (WA_keepQueryString AND Request.QueryString <> "" AND Request.QueryString.Count > 0) then
if (inStr(WA_redirectURL,"?") > 0) then
WA_redirectURL = WA_redirectURL & "&"
else
WA_redirectURL = WA_redirectURL & "?"
end if
WA_redirectURL = WA_redirectURL & Request.QueryString
end if
Response.Redirect(WA_redirectURL)
end if
end if
%>

Ray Borduin
09-15-2009, 02:40 PM
I called and we found that the issue was fixed for this instance but the same fix had to be done for the second iRite field on the page. Once both were updated the page worked as expected.