• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

postText not save completely

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thx your reply.I make it out.
[originally posted on jforum.net by william]
 
Wanna see my flashlight? How about this tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic