Menu

#201 Entity Insertion within PHP

open
None
5
2004-11-07
2004-07-28
No

Hi,

screem should not insert HTML Entities whithin PHP
syntax highlighting. When I wan't to insert an &&,
then I get & ... the &; for the first insertion of
& and "amp" for the second one.

Discussion

  • David A Knight

    David A Knight - 2004-07-28

    Logged In: YES
    user_id=736

    similar problems occur with < expanding to <>.

    The problem is bigger though as in a lot of cases this is
    exactly what you want. Now screem could check which tag
    the cursor is in when these are typed, and if it is <?php or
    <? not offer the expansion, but even then this can still be
    not what is wanted, as you could be outputting content,
    either in quote marks, or using print <<< EOF

    Checking the tag the cursor is in can also be a slow process
    as the document structure needs to be built, so depending on
    the size of it a delay of upto or more than a second when <
    or & is pressed.

    The problem also hits comments, cdata sections as well.

     
  • Sven Salzwedel

    Sven Salzwedel - 2004-08-19

    Logged In: YES
    user_id=575462

    As a temporarily solution I'd suggest to disable entitiy
    insertion completely if the mime-type of the file is php, as
    using HTML together with PHP is bad style. Using a template
    engine is a quite better way to output HTML with PHP. But
    that's only my opinion.

     
  • David A Knight

    David A Knight - 2004-11-07

    Logged In: YES
    user_id=736

    CVS head now checks the current context using the document
    tree which sorts this problem out, however it doesn't
    rebuild the tree, so the context may not be accurate for the
    current state. It has the advantage of being faster than
    the previous method though.

     
  • David A Knight

    David A Knight - 2004-11-07
    • assigned_to: nobody --> davek
     

Log in to post a comment.