Shares of Baidu.com (NASDAQ:BIDU) soared 20% yesterday, opening higher this morning before giving back some of yesterday's monster gains.

The spurt is certainly welcome, especially as Baidu is coming under attack on ethical issues.

This past weekend, The Register published a damaging account of how it alleges that Baidu profits from digital music piracy in China. The grimmest of the allegations after its six-month forensic study are that Baidu doesn't link to the top legal downloading sites and that half of its MP3 searches lead to a "network of mysterious sites with closely related domain names" that only Baidu seems to deep-link to.

That last point can be crushing if true. Baidu's defense is that it can't police its users or the Internet. It's a similar argument that helped eBay (NASDAQ:EBAY) fend off high-end jeweler Tiffany (NYSE:TIF) earlier this year. The luxury retailer argued that counterfeit Tiffany items were selling briskly on eBay's marketplace, but it came up short litigiously.

Baidu also got into hot water this month as a result of the tainted baby formula scandal that has killed a few infants in China. Online speculation is alleging that the site was paid by milk powder makers to suppress the news. "There is no proof that Baidu played a part in concealing the discovery," concedes The Wall Street Journal, but the hurtful perception is out there.

That same article also goes on to detail how Baidu doesn't set its text ads apart from its search results the way that Google (NASDAQ:GOOG) does. It suggests that educated Internet users, tired of being duped into wrongfully clicking on ads, are moving on to Google.

So bad it's good
The conspiracy theorist fallacy, of course, is that Baidu isn't relinquishing market share at all. The latest survey by market research firm China IntelliConsulting Corporation shows that Baidu commanded 65.8% of all search queries in China. Google is far behind at 22%. Sohu.com's (NASDAQ:SOHU) has overtaken Yahoo! (NASDAQ:YHOO) for the inconsequential bronze at less than 3% of the market.

If more people are using Baidu, it follows that the Google enlightenment theory is either off or that the vast majority of a country's online user base still prefer Baidu, warts and all.

As an investor with a conscience, I'm not about to defend any of the allegations if they ultimately are proven correct. Yahoo! has already had to pay a small penalty for its digital music missteps, and the courts will dictate to what extent other Chinese search engines are liable.

The right way to beat Google
Is Baidu wrong? Maybe. Is Google a saint? Of course not.

However, it's still in Baidu's best interest to be more like Google when it comes to monetizing its site. Making its ads more distinctive will lead to advertisers paying more for better quality leads. Promoting legal music services will attract a more lucrative audience for advertisers, predisposed to paying for merchant services.

Musical piracy is a stateside epidemic too, but it has taken commercial baby steps with the arrival of Apple's (NASDAQ:AAPL) iTunes Music Store and ad-supported outlets for major labels like Google's YouTube.

The moment that the music industry and Baidu realize that they can make more as allies than by being locked in mortal combat, is the moment that gray areas become silver linings in the realm of online ethics.

Given Baidu's explosive growth, it's hard to fathom it not doing the right thing when it hits the fork in the road that calls for the company taking the high road. It will know it when it sees it. It's the street lined with gold instead of eyeballs.

Related Foolishness:

Baidu has more than tripled since being singled out to Rule Breakers readers two years ago. Google is another Rule Breakers pick. eBay and Apple are recommendations for Stock Advisor subscribers. Why are you missing out on these great stock picks? The answer may be waiting in free 30-day passes to any or all of the newsletters.

Longtime Fool contributor Rick Munarriz has been a fan of China's growth stocks for several years now, even though he does not own shares in any of the companies in this story. He is also part of the Rule Breakers newsletter research team, seeking out tomorrow's ultimate growth stocks a day early. The Fool has a disclosure policy.