<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Peter,<br>
<br>
Thanks! I figured out the workaround, but didn't have a way of doing
bulk changes. Great to have a fallback if webserve.ca takes too long to
come to its senses. There are probably thousands of wiki pages by now
that have the <a class="moz-txt-link-freetext" href="http://">http://</a> string included.<br>
<br>
Much appreciated.<br>
<br>
...in fact I hadn't looked at your tool before, and it certainly looks
like it would be useful as a general system management tool.<br>
<br>
Thanks again.<br>
<br>
- Henrik<br>
<br>
Peter & Melodye Bowers wrote:
<blockquote cite="mid:02744F925D754391AE6B1F38A2460535@plb" type="cite">
<blockquote type="cite">
<pre wrap="">So suddenly none of my websites can post external links (with
the string
<a class="moz-txt-link-rfc2396E" href="http://">"http://"</a> anywhere in the page), and hundreds if not
thousands of pages
that have this protocol embedded are suddenly uneditable.
</pre>
</blockquote>
<pre wrap=""><!---->
Obviously this is a hosting problem and they should fix it, but a workaround
is possible if the (http:)//www.example.com syntax works. This WikiSh
script would replace all occurrences of <a class="moz-txt-link-freetext" href="http://">http://</a> with (http:)// in all pages
in the group Test.
sed -i 's/<a class="moz-txt-link-freetext" href="http:\/\//(http:)\/\//">http:\/\//(http:)\/\//</a>' (grep -l '<a class="moz-txt-link-freetext" href="http:\/\/">http:\/\/</a>' Test.*)
(This would be put directly into the control panel)
Presumably you could do the same with *.*, but you may want to test it out a
bit at a time. You can do a single file or 2 or 3 like this:
sed -i 's/<a class="moz-txt-link-freetext" href="http:\/\//(http:)\/\//">http:\/\//(http:)\/\//</a>' (grep -l '<a class="moz-txt-link-freetext" href="http:\/\/">http:\/\/</a>' Test.Page1
Test.Page2)
If you want to do several groups at a time you could do this:
sed -i 's/<a class="moz-txt-link-freetext" href="http:\/\//(http:)\/\//">http:\/\//(http:)\/\//</a>' (grep -l '<a class="moz-txt-link-freetext" href="http:\/\/">http:\/\/</a>' GroupA.* GroupB.*)
If you want to see which files are going to be changed ahead of time you
could do this:
grep -l '<a class="moz-txt-link-freetext" href="http:\/\/">http:\/\/</a>' Test.Page1 Test.Page2
Hopefully that gives enough examples to get things started in the right
direction. Obviously a search/replace on potentially every page in the
entire site is a *big* deal and whether that's the right move for you is
your decision. I'm just giving you a way to do it if it works for you...
(As usual the most recent version of WikiSh.php is necessary -- I discovered
some inconsistencies in the way I was handling escaped slashes with
search/replace and so that is fixed only in version 2008-03-23.)
-Peter
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Henrik Bechmann
<a class="moz-txt-link-abbreviated" href="http://www.bechmann.ca">www.bechmann.ca</a>
Webmaster, <a class="moz-txt-link-abbreviated" href="http://www.dufferinpark.ca">www.dufferinpark.ca</a></pre>
</body>
</html>