| 1 | n/a | |
|---|
| 2 | n/a | # This was taken from http://python.org/sf/1541697 |
|---|
| 3 | n/a | # It's not technically a crasher. It may not even truly be infinite, |
|---|
| 4 | n/a | # however, I haven't waited a long time to see the result. It takes |
|---|
| 5 | n/a | # 100% of CPU while running this and should be fixed. |
|---|
| 6 | n/a | |
|---|
| 7 | n/a | import re |
|---|
| 8 | n/a | starttag = re.compile(r'<[a-zA-Z][-_.:a-zA-Z0-9]*\s*(' |
|---|
| 9 | n/a | r'\s*([a-zA-Z_][-:.a-zA-Z_0-9]*)(\s*=\s*' |
|---|
| 10 | n/a | r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~@]' |
|---|
| 11 | n/a | r'[][\-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~\'"@]*(?=[\s>/<])))?' |
|---|
| 12 | n/a | r')*\s*/?\s*(?=[<>])') |
|---|
| 13 | n/a | |
|---|
| 14 | n/a | if __name__ == '__main__': |
|---|
| 15 | n/a | foo = '<table cellspacing="0" cellpadding="0" style="border-collapse' |
|---|
| 16 | n/a | starttag.match(foo) |
|---|