Fork me on GitHub

Changes for #778

Description changed by xot (2012-12-03 07:21:53)

 1:  1:
 I run a programming website running FluxBB 1.5.1 and one of the long-standing problems with PunBB/FluxBB is its handling of the contents of code tags. I run a programming website running FluxBB 1.5.1 and one of the long-standing problems with PunBB/FluxBB is its handling of the contents of code tags.
  
 The parser is smart enough to escape any BBCode it finds inside code tags, but it is not smart enough prevent the tags from being converted to lowercase. The parser is smart enough to escape any BBCode it finds inside code tags, but it is not smart enough prevent the tags from being converted to lowercase.
  
 This becomes a real problem when someone posts source code containing arrays. For example: "sample_array[B ]" becomes "sample_array[b ]", that is, the index "B" becomes "b", breaking the source code. This becomes a real problem when someone posts source code containing arrays. For example: "sample_array[B ]" becomes "sample_array[b ]", that is, the index "B" becomes "b", breaking the source code.
  
 My personal solution has been to remove strtolower() at three places in the parser. It means users have to be sure to use lowercase tags when they post, but at least the source code they post is posted correctly, something you'll agree is critical for a programming site. My personal solution has been to remove strtolower() at three places in the parser. It means users have to be sure to use lowercase tags when they post, but at least the source code they post is posted correctly, something you'll agree is critical for a programming site.
  
 I'm sure there is a better way to do this that preserves the "helpful" case changing aspect of FluxBB, but the parser is a bit too convoluted and unfamiliar for me to fix myself. I'd love to see this problem addressed. I'm sure there is a better way to do this that preserves the "helpful" case changing aspect of FluxBB, but the parser is a bit too convoluted and unfamiliar for me to fix myself. I'd love to see this problem addressed.
  
 P.S. P.S.
  
-Even your bug tracker is giving me grief over the example arrays because it thinks they are BBCode. :/+Even your bug tracker is giving me grief over the example arrays because it thinks they are BBCode. I've inserted spaces to fool the parser. :/