Replacing "illegal characters" in html

From: BenO (ben.nospam_at_ladeda.co.uk)
Date: 05/09/04


Date: Sun, 9 May 2004 19:48:49 +0000 (UTC)

Hi

I'm new to python and need to write a function to replace certain characters
in a string (html).

The characters I need to replace come from MS Word copy & paste and are:

' (Left quote)
' (Right quote)
Double Left quotes
Double Right quotes

Can anyone help me or point me in the right direction on an efficient way of
doing this?

Thanks

Ben



Relevant Pages

  • Re: D.E. Knuths strlen
    ... In order to locate the end of a string quickly, ... I had to check this quote, ... FWIW, translated into C, you get a 1:1 ratio of characters to "words". ...
    (comp.lang.c)
  • RE: Internet UTC
    ... Local lcQuote As String,; ... *-- Grab the quote from the Web page. ... *-- trailing HTML with the TRANSFORMAND VALfunctions. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Help with a Reg Ex
    ... Although I know that it is checking to see if the string starts with ... " # match a quote ... except comma ... characters, but not starting with a comma; a quote; a comma and a quote. ...
    (comp.lang.perl.misc)
  • Re: Help with a Reg Ex
    ... " # match a quote ... $ # end of string ... characters, but not starting with a comma; a quote; a comma and a quote. ... ","Aber Diamond Corporation is a specialist diamond company focusing ...
    (comp.lang.perl.misc)
  • Re: Mandis Quotes (aka retiring """ and )
    ... characters not be allowed, ... Then I remembered string ... Any binary data can be inside the quote. ...
    (comp.lang.python)