aspose file tools*
The moose likes JForum and the fly likes Character escaping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Character escaping" Watch "Character escaping" New topic
Author

Character escaping

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Not quite sure what the issue here is.. is it the extra space in the second Old - > New?

Anyway, forum_show.htm shows the list of topics in a forum. post_show.htm displays the list of reply in a topic.
[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
have a look yourself:

http://www.jforum.net/posts/list/0/3884.page#16096

I'll check on those two template files and see if I can figure out any differences in displaying the informations....
[originally posted on jforum.net by Sid]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I guess the "subject" - which is the concern - is the topic.title.

In both template files it's shown as topic.title?html - so I cant make a difference right away. Yet the information shown is different ...
[originally posted on jforum.net by Sid]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Greetings,

in case a user creates a forum post with the topic name "Old -> New" - on the list showing all posts in the forum it will be listed correctly.

If you switch to the specific forum entry however, the Old -> New text is shown as Old - > New - which does not really look nice ^^

What entry do I have to modify in which template file so it shows correctly?
[originally posted on jforum.net by Sid]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
OK, I think I know what's going on here. Since any posting (reply or main topic) can have an individual subject line (like this reply), the Subject: being listed is the post.subject (as opposed to topic.title).

To prevent cross scripting attacks and other script kiddie stuff, all posts get run thru a "safe html" function prior to being given to the template engine. This apparently includes the subject line.

However, the post_show_action_buttons_inc.htm include template, which generates the posting header, uses ${post.subject?default("")?html}. So the template engine is trying to convert the > to "safe" html as well. This is probably what is causing the problem.

Try changing the post_show_action_buttons_inc.htm template to use ${post.subject?default("")}.
[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
can you have a look at:

http://www.jforum.net/posts/list/0/3888.page#16109

Yet another case of character issues - this time it's not html related characters but unicode.

How/where can I fix this?
[originally posted on jforum.net by Sid]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
thanks monroe. the characters now show non-html-escaped
[originally posted on jforum.net by Sid]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
This one I'm not sure about... it might be due to the jForum_PostsText table not being defined for Unicode support. So the unicode character's get stored correctly in the post table but does in the Topics

I seem to recall some posts about this being a problem and requiring some manual configuration in the database.
[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
The thing that's confusing bout your words is that there's one general attribute in the systemglobals.conf (or within the mysql.properties) that defines the encodings - why would it be different for a specific table then? *scratches head*

I'll try to do some research on that myself too then. Texts may look a little bit stupid if unicodes characters are being used ...
[originally posted on jforum.net by Sid]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
FWIW, with MySQL, there are table options for character set and collation.
[originally posted on jforum.net by monroe]
 
Don't get me started about those stupid light bulbs.
 
subject: Character escaping