Bug 15045 - &t being added to the top of a textarea, and a > is being replaced by a ;
Summary: &t being added to the top of a textarea, and a > is being replaced by a ;
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Major
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-22 06:42 PDT by Terry Riegel
Modified: 2022-07-12 10:51 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Terry Riegel 2007-08-22 06:42:39 PDT
This one is hard to duplicate. I have a very fragile test case that I can duplicate the problem on. I would be happy to show someone but it may be difficult to demonstrate with out me stepping through the procedure.

The bug happens intermitently and isn't always caught by me. I use Safari to edit web sites, and when this bug cropps up my page gets mangled. It doesn't happen all of the time. This is a test case where I was able to get it to happen over and over again.

Here is how to duplicate it.

1. go to http://www.clearimageonline.com/pages/start/login.html
  login as webkit, password: webkittestcase
2. Click the little icon next to snipshot.html
3. This opens a web editor right after the text "...it messes up frames" add a space and save
4. What happens is &t gets added to the start of the text in the textarea, and a > gets replaced with a ;
5. If you do a view source you can see that the sources does not contain these spurious characters.
6. If you save again it will sve the spurious characters.

THE TEXT BEFORE LOOKS LIKE
------------------------
<<
function snipshot(f,edittext,cx,cy) locals temp,a,original do
 # Use snipshot to edit the images, always save the original, see code below /#
 if left(f,1)<>'/' then f=replaceall(dirname(page)+'/'+f,'//','/') /if
 if isfile(f) then
  a=ci_extract(f)
  original=a[1]+a[6]+a[2]+ci_prefs[1,4]+'-ORIGINAL'+a[4]
  if not(isfile(original)) then temp=syscp(f,original) /if
  if isfile('/upload/file'+usernum) then
   temp=sysmv(original,f+'ORIGINAL')
   temp=ci_rmtemp(f)
   temp=sysmv(f+'ORIGINAL',original)
   temp=sysmv('/upload/file'+usernum,f)
  /if
  if cx='' or cy='' then
   return '<a exithref="http://services.snipshot.com/?snipshot_input='+domainurl+postprep(replaceall('/'+original,'//','/'))+'&snipshot_callback='+postprep(getlink(page))+'&snipshot_output=file'+usernum+'&snipshot_callback_method=post">'+edittext+'</a>' /return
  else
   return '<a exithref="http://services.snipshot.com/?snipshot_input='+domainurl+postprep(replaceall('/'+original,'//','/'))+'&snipshot_callback='+postprep(getlink(page))+'&snipshot_output=file'+usernum+'&snipshot_callback_method=post&snipshot_output_options='+postprep('{"size":{"max":{"width":'+cx+',"height":'+cy+'}}}')+'">'+edittext+'</a>' /return
  /if
 else
  return '' /return
 /if
/function
f='test.jpg'
>>
<html>
<a href="<<page>>">RELOAD</a>  |  <a href="<<page>>" target="new">OPEN IN NEW WINDOW</a><hr>
<<ci_img(f,'','','TRUE')>>
<br>Make sure you run this in its own window. It messes up frames<hr>
<<snipshot(f,'Edit This Picture',90,125)>>
</html>


THE TEXT AFTER LOOKS LIKE
------------------------
&t<<
function snipshot(f,edittext,cx,cy) locals temp,a,original do
 # Use snipshot to edit the images, always save the original, see code below /#
 if left(f,1)<>'/' then f=replaceall(dirname(page)+'/'+f,'//','/') /if
 if isfile(f) then
  a=ci_extract(f)
  original=a[1]+a[6]+a[2]+ci_prefs[1,4]+'-ORIGINAL'+a[4]
  if not(isfile(original)) then temp=syscp(f,original) /if
  if isfile('/upload/file'+usernum) then
   temp=sysmv(original,f+'ORIGINAL')
   temp=ci_rmtemp(f)
   temp=sysmv(f+'ORIGINAL',original)
   temp=sysmv('/upload/file'+usernum,f)
  /if
  if cx='' or cy='' then
   return '<a exithref="http://services.snipshot.com/?snipshot_input='+domainurl+postprep(replaceall('/'+original,'//','/'))+'&snipshot_callback='+postprep(getlink(page))+'&snipshot_output=file'+usernum+'&snipshot_callback_method=post";'+edittext+'</a>' /return
  else
   return '<a exithref="http://services.snipshot.com/?snipshot_input='+domainurl+postprep(replaceall('/'+original,'//','/'))+'&snipshot_callback='+postprep(getlink(page))+'&snipshot_output=file'+usernum+'&snipshot_callback_method=post&snipshot_output_options='+postprep('{"size":{"max":{"width":'+cx+',"height":'+cy+'}}}')+'">'+edittext+'</a>' /return
  /if
 else
  return '' /return
 /if
/function
f='test.jpg'
>>
<html>
<a href="<<page>>">RELOAD</a>  |  <a href="<<page>>" target="new">OPEN IN NEW WINDOW</a><hr>
<<ci_img(f,'','','TRUE')>>
<br>Make sure you run this in its own window. It messes up frames<hr>
<<snipshot(f,'Edit This Picture',90,125)>>
</html>
Comment 1 David Kilzer (:ddkilzer) 2007-08-22 09:48:09 PDT
Based on the description, I'm guessing that ">" or "<" is being replaced by "&lt;" or "&gt;" in the DOM, but then something bad happens and those literal values are edited into "&t" or ";".  A reproducible test case would really help in this instance.

Terry, does this happen while you're typing/editing the text?

Are you using Safari 3 Public Beta v. 3.0.3?  A WebKit nightly?  Safari 2.0.4?
Comment 2 Terry Riegel 2007-08-22 10:17:22 PDT
I have a reproducable test case, but it is like standing on my hands while holding a cup of coffe with my toes and touching the TV antanae to get good reception. I noticed it when Safari 3 first came out. It was/is of a severe enough nature that I had to stop using safari 3 since it would mess up my code.

It happens when the page loads. Sometimes it will happen just by opening the page, other times (like the one I was able to duplicate) it happens after some sequence of editing and the page is saved/reloaded.

If you call me (252)437-7771 ext 227 I can step you through a reproducable test case.
Comment 3 David Kilzer (:ddkilzer) 2007-08-22 21:26:44 PDT
Terry, do you have SnapzPro?  If so, you could create a demonstration movie with narration.

Comment 4 Brent Fulgham 2022-07-12 10:51:21 PDT
The relevant test case no longer exists.