• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

postText not save completely

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have using a WYSIWYG editor, now i have some problem with save text. For example, i use the editor to get some word smaller and i see the html code like under

After i saved , the post show the word no change. and i click twice to see code like under

Its seems style="font-size :7pz; disapear

So, i try trace how the bbcode do this, like under

and i see the bb_config.xml.

it looks like using span style .too.

i guess <span style="font-size: $1px; line-height: normal;">$2</span> is allowed.
why the editor with same code but not work .

P.s 1. The editor just use the same textarea in post_form.htm.And others action is work.
But not two editor appear at one time. Just thourgh switching.
2. the<span> tag i set allowed by admin mode.
[originally posted on jforum.net by william]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is because of the code that keeps the Cross Site Script Kiddies from putting malicious HTML into posts.

You can define what tags and attributes are allows in your config file using html.tags.welcome and html.attributes.welcome. Just be sure you copy the defaults in from the SystemGlobals.properties too. And make sure your not allowing XSS hacks in as well.

If you need to be more specific, you can also modify the SaveHtml class.
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thx your reply.I make it out.
[originally posted on jforum.net by william]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!