简体   繁体   中英

Dreamweaver CS3 - auto closing custom tags - unable to stop

I have inherited some PHP code which creates custom tags thus:

<group_description<?php echo $result['products_id'];?> style="display:none">
     ++some text here++
  </group_description<?php echo $result['products_id'];?>>

So this generates something like:

<group_description11 style="display:none">
     ++some text here++
  </group_description11>

Problem is that Dreamweaver CS3 will (when opening the php document - it's not on save - only if you close then reopen) will rewrite the last line to:

</group_description><?php echo $result['products_id'];?>>

so the resulting HTML output becomes:

</group_description>11>

I have all code rewriting OFF in DW and work only in code view - I can find nothing anywhere on this - has anybody any suggestions?

Baffled - Graeme

Not sure if you are willing to lose all auto close functionality, but you could turn off the feature . The following link says

Note : By default, Dreamweaver determines when a closing tag is needed and inserts if automatically. You can change this default behavior so that Dreamweaver inserts a closing tag after you type the final angle bracket (>) of the opening tag. Alternatively, the default behavior can be to insert no closing tag at all. Select Edit > Preferences > Code Hints, and then select one of the Close Tags options.

Potentially changing the behavior to insert a closing tag after you type the final angle bracket would resolve this issue as well and you would not lose all auto close functionality

Hope this helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM