• My site was recently converted to WP 2.7.1 from static HTML. One serious glitch is that the original HTML includes comments like <!– this is a comment –>

    WP is converting the final –> to an 8211 en-dash. I found the posting “HTML Close Comment Tag is getting modified” where Otto42 suggests adding remove_filter(‘the_content’, ‘wptexturize’); to functions.php.

    I also see that Otto submitted a bug which is marked worksfor me. Not sure what version that refers to.

    I don’t see where in functions.php one would add that and I’m not clear what all I’d lose by turning off wptexturize if I did that.

    In formatting.php, I found this:

    $static_characters = array_merge(array(‘—‘, ‘ — ‘, ‘–‘, ‘xn–’, ‘…’, ‘‘, ”s’, ””, ‘ ™’), $cockney);
    $static_replacements = array_merge(array(‘—’, ‘ — ‘, ‘–’, ‘xn--‘, ‘…’, ‘“’, ‘’s’, ‘”’, ‘ ™’), $cockneyreplace);

    which looks to me to be the place where the change is likely being made, in the third element of the match. I could imagine dropping that element might fix the problem, but it’s pretty deep into the system and would surely reappear next update. Similarly, one might add a replacement –> to –> I suppose.

    I’m looking for advice on how best to proceed. I’m willing to read and study as well, as I’d like to understand what’s up here. Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter ronjeffries

    (@ronjeffries)

    Further to this: I notice that <!–more–> seems to work just fine. So I’m wondering why my comments are getting hammered.

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘HTML comment loses content. info on wptexturize etc?’ is closed to new replies.