Bug 105619 - [editor] Add a function to convert particular chars to html entities.
Summary: [editor] Add a function to convert particular chars to html entities.
Status: NEW
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.html (show other bugs)
Version: 0.7   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: Future   Edit
Assignee: Nick Sandonato CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on:
Blocks:
 
Reported: 2005-07-29 18:25 EDT by Kinder Hervé CLA
Modified: 2013-06-19 11:12 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kinder Hervé CLA 2005-07-29 18:25:53 EDT
While editing html, javascript or jsp file sometime I miss a little
functionality that would save me a lot of time : convert selected char to html
entities.

For exemple :
In a html editor, you type the following :
<input type="button" value=">" title="next"/>
It's valid and has no problem but the correct form should be :
<input type="button" value="&gt;" title="next"/>
And with this kind of trick we can escape char encoding problem easier, for
example :
"José" becomes "Jos&eacute;" and the work fine in any charset...
Comment 1 Kinder Hervé CLA 2005-07-29 18:35:36 EDT
All the HTML entities are defined at the following URL :
http://www.w3.org/TR/html4/sgml/entities.html
Comment 2 David Williams CLA 2005-08-04 11:07:22 EDT
I fully agree with this request (and needed several times myself). 

I'll mark as 'help wanted' as seems a good candidate for others to 
contribute to? 

I think several things need to be thought through, though ... I could envision 
a number of related prefrences ... convert as typed, convert selected text,
convert on save ... and the conversion should be able to "round trip" fairly
smartly. 
There might also merit to making sure the document is valid before making the
change, since it would do a bad job if some end bracket missing somewhere ...
well, it might ... might misinterpret something wrong and convert the wrong
characters. 
Comment 3 Jochen Hiller CLA 2006-10-18 05:56:01 EDT
I am also looking for such functionality:

- edit an HTML document (e.g. Eclipse documentation), and trying to add a snippet for an Eclipse extension point (which is pure XML).

- If I copy it into a <pre>...</pre> section, I have to quote manually all tag "<>&" characters. So, it would be great to have an action like "Source (or Refactor) -> Quote selected Text"

- Additionally it would be nice, if the current selected text could be quoted including color information, so colored syntax will be directly usable in HTML

I am currently doing same stuff with VIM. I thought it would be nice in 21th century to be able to do this without fallback to VI times ;-)
Comment 4 David Williams CLA 2007-04-24 13:31:46 EDT
Since there's been no volunteers after all this time, let's see if there's anything we can do for WTP 3.0. 

Comment 5 Amy Wu CLA 2007-09-26 17:05:21 EDT
I'm going to add the helpwanted & bugday keywords back in in case anyone wants to work on it.  Even if there are no takers, I'd still like to get this fixed in 3.0.

Also, Jochen, your comments about a new "quote selected text" action sounds like it needs a separate enhancement request.  Please feel free to open one if you have not done so already.
Comment 6 Amy Wu CLA 2008-10-27 04:27:25 EDT
reassigning to inbox