Manual:$wgExperimentalHtmlIds

Details
Should we allow a broader set of characters in id attributes, per HTML5?

If not, use only HTML 4-compatible IDs.

This option is for testing -- when the functionality is ready, it will be on by default with no option.