0

Hi,

I don't know what i have done but i want to recover code below. It is very long, i give you little part of it. Any idea how to recover it.

Thanks

<p><span class="caps">APRIL</span></p>

<p><span class="caps">SAT</span> 18<br>
<span class="caps">OPEN TUTORIAL </span>(10.00- 4.00)<br>
This day will include a session on Reflective Practice, Alternative Formats and Physical Skills. It is open to all SWs although the majority of participants are likely to be <span
3
Contributors
6
Replies
12
Views
8 Years
Discussion Span
Last Post by almostbob
0

Veledrom,

Here's what to do:

  1. Create a directory on your computer named "rescue".
  2. Copy and paste html file below (complete with its javascript) to a new text file and save as "index.html" in "rescue".
  3. Go here and download php.js - click the link "php.packed.js" about one third the way down the page. Your browser may invite you to save the file with some other name - change it back to "php.packed.js" before saving to your directory "rescue".
  4. Following my example below, paste all your encoded text into your file "index.html".
  5. On each line, add single quotes round the whole line then add the prefix txt[n] = and a final ; . (where n = 1, 2, 3, 4 etc.)
  6. Browse "index.html" in your browser.
  7. Highlight/copy the recovered markup from the textarea and paste to wherever it is needed.

The only problem I foresee is if any of the lines contain an unencoded single quote. If so, then track them all down and escape them by adding a backslash before each one. Should work.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Airshow :: HTML Recovery</title>
<!-- http://www.daniweb.com/forums/newreply.php?t=194645 -->

<script src="php.packed.js"></script><!-- /*Download from http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_html_entity_decode/ */
 -->
<script>
var txt = [];
/* ********************** */
txt[0] = '&amp;lt;p&amp;gt;&amp;lt;span class=&amp;quot;caps&amp;quot;&amp;gt;APRIL&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;';
txt[1] = '&amp;lt;p&amp;gt;&amp;lt;span class=&amp;quot;caps&amp;quot;&amp;gt;SAT&amp;lt;/span&amp;gt; 18&amp;lt;br&amp;gt;';
txt[2] = '&amp;lt;span class=&amp;quot;caps&amp;quot;&amp;gt;OPEN TUTORIAL &amp;lt;/span&amp;gt;(10.00- 4.00)&amp;lt;br&amp;gt;';
txt[3] = 'This day will include a session on Reflective Practice, Alternative Formats and Physical Skills. It is open to all SWs although the majority of participants are likely to be &amp;lt;span';
/* ********************** */

onload = function(){
	document.getElementById('txt').value = html_entity_decode(txt.join("\r\r"));
}
</script>
</head>
<body>
<textarea id="txt" style="width:500px; height:500px;"></textarea>
</body>
</html>

Good luck with it.

Airshow

0

http://centricle.com/tools/html-entities/ copy the escape coded texted in the box and click the decode button

<p><span class="caps">APRIL</span></p>

<p><span class="caps">SAT</span> 18<br>
<span class="caps">OPEN TUTORIAL </span>(10.00- 4.00)<br>
This day will include a session on Reflective Practice, Alternative Formats and Physical Skills. It is open to all SWs although the majority of participants are likely to be <span <p><span class="caps">APRIL</span></p>

<p><span class="caps">SAT</span> 18<br>
<span class="caps">OPEN TUTORIAL </span>(10.00- 4.00)<br>
This day will include a session on Reflective Practice, Alternative Formats and Physical Skills. It is open to all SWs although the majority of participants are likely to be <span
0

Bob, I didn't think of looking for an online resource. That's much quicker.

Veledrom, unless you enjoy the challenge of doing it my way (and have the time), go with Bob's method.

Airshow

1

spent a lot of time repairing obfuscated and over-escaped codes where the original writer left the company, and they have no copy of the source

Votes + Comments
Perfect help. Thanks almostbob
1

I knew there must be someone somewhere who made a career of it ;)

Votes + Comments
Useful information. Thanks airhow
0

A very interesting side career,
some of the things hidden in obfuscated code when the author just got fired would . . . . . . . . .

glad it helped

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.