"So shines a good deed in a WEARY world"?

The common version of the quote, featured in Willy Wonka and the Chocolate Factory, among others, seems to be “So shines a good deed in a weary world.” That’s the way I’ve usually heard it, and that’s the way I think most people repeat it.

In The Merchant of Venice, Portia’s actual line is “So shines a good deed in a naughty world.”

When/why did the quote morph? Was it intentional (maybe to avoid the associations with the word “naughty”) or accidental (like Bogie’s Maltese Falcon “we are such stuff as dreams are made of”)?

Well, I won’t lie; I googled it.

It goes on to say that Setzer tweaked the line, probably to be less archaic and more reflective of Wonka’s character.

http://home.att.net/~tom.brodhead/wonka.htm

Huh! I guess it is a Bogie-style misquote meme. Thanks!