Убрать ? и & можно как-нибудь так
<head>
<script>
window.onload = function () {
  var str1 = '<img src="http://javascript.ru/forum/image.php?u=19820&dateline=1334914235">';
  str1 = str1.replace(/\?/g, '').replace(/&/g, '&');
  var str2 = document.body.innerHTML;
  str2 = str2.replace(/\?/g, '');
  if (str2.search(str1) != -1) {
    alert('есть');
  } else {
    alert('нет');
  }
}
</script>
</head>
<body>
<img src="http://javascript.ru/forum/image.php?u=19820&dateline=1334914235">
</body>