- notfred
- Dec 1, 2005
-
|
hey wiz posted:
Someone from my team decided to check this in today:
code:while (value.contains("&")) {
int index = value.indexOf("&");
value = value.substring(0, index+1) +
value.substring(index+5, value.length());
}
this.value = value;
Bonus point if you can spot the bug.
this.value = value.replaceAll("&", "&");
While that's not ideal code, it's hardly a horror. It looks a lot like everything every C programmer ever wrote in javascript.
|
#
¿
Jun 10, 2008 03:51
|
|
- Adbot
-
ADBOT LOVES YOU
|
|
#
¿
Apr 29, 2024 13:13
|
|