Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2006-12-15 14:52:39

bronto
Xinha Community Member
Registered: 2006-12-15
Posts: 11

HtmlEntities plugin

I am interested in the html entitities plugin but am not sure how it works.  I've enabled the plugin in my installation:

xinha_plugins = xinha_plugins ? xinha_plugins :
      [
        'CharacterMap',
        'HtmlEntities'
      ];

and set up an editor to use it:

xinha_editors['txtAbstract'].registerPlugins(['CharacterMap','HtmlEntities']);

but the editor shows no additional toolbars or buttons.  Should it?  Or is this something that works in the background?

Offline

#2 2006-12-16 01:35:54

mharrisonline
Xinha Administrator
From: Denver, Colorado
Registered: 2005-04-11
Posts: 110
Website

Re: HtmlEntities plugin

What it does is prevent IE from converting HTML entities into the actual characters. Also, if someone is in IE and they paste in text containing symbols and characters the plugin knows to replace, they will be converted to entities. There is no button, it works in the background.

Offline

#3 2006-12-16 03:01:41

bronto
Xinha Community Member
Registered: 2006-12-15
Posts: 11

Re: HtmlEntities plugin

Interesting.  I had no idea IE converted entities and that could explain some of the strange behavior I've seen in the past.  Can you point me to any documentation that explains what it does, why and when?

Offline

#4 2006-12-16 09:09:58

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: HtmlEntities plugin

Entities are generally not used inside the editor, both browsers, except &, ", <, >

This is OK if you use UTF-8 encoding in your page, or you surely only use characters that are available in your charset.

The HtmlEntities plugin cares for the conversion of "special characters" to entities which is

Technically it works very simple: It takes a long list of characters and their respective entity and fills the config.specialReplacements variable with them.

This list of entities used can be found and edited in the plugin directory. If you choose to edit the list, you can (should) save it under a new name and reference this by using

xinha_config.HtmlEntities.EntitiesFile = "/path/to/your/file.js"

Then you can update Xinha without overwriting your changes

Offline

#5 2006-12-16 16:22:54

bronto
Xinha Community Member
Registered: 2006-12-15
Posts: 11

Re: HtmlEntities plugin

This site is primarily for submitting scientific papers.  Many of the authors are "international".  I have switched to UTF-8 this year, presuming that it will help with the many problems we had last year when the international factor increased substantially.  But using the entities plugin can provide good backup, I assume.  We also have to export the data to XML for importation into inDesign, so the data needs to be XHTML compatible as well.

So non-latic charactars are a factor. So are mathematical concepts, and the usage of < symbols tripped us up.  As did, in some circumstances, " and ' when the data wasn't slashed in php code.  We also saw appropriate usage of entities, but entities I had never seen before such as a 5 digit entity.  Don't have it in front of me now, but it was something like "

Last edited by bronto (2006-12-16 16:25:56)

Offline

Board footer

Powered by FluxBB