I can't use punctuation in the story title | General Support | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Register Lost password?
sp_Feed sp_TopicIcon
I can't use punctuation in the story title
Avatar
yami
Member
Members
Forum Posts: 13
Member Since:
September 14, 2018
sp_UserOfflineSmall Offline
1
January 6, 2019 - 12:03 am
sp_Permalink sp_Print

Hi guys!

Here's my issue: when I want to submit a post , whenever I use punctuation such as period, comma, and parentheses, on the story title it disappear so i can't use any punctuation on my title!

How can I fix this?

Thanks!

Yami

Avatar
redwine
Admin
Forum Posts: 341
Member Since:
February 21, 2018
sp_UserOfflineSmall Offline
2
January 6, 2019 - 11:28 am
sp_Permalink sp_Print

1- Open /templates/bootstrap/submit_step_2_center.tpl
2- Look for $('#title').keyup(function() {
3- Modify the below code by removing the characters you want to allow in the title. Characters are between /[ and ]/. Make sure not to allow characters that will cause an XSS attack:
re = /[`~!@#$%^&*()|+=?;:'",.\{\}\[\]\\\/]/gi;

4- Look for $('#title').bind("paste", function() {
5- Modify the same way as above the below code:
var dataFull = data.replace(/[`~!@#$%^&*()|+=?;:'",.\{\}\[\]\\\/]/gi, '');

Save the file!

Avatar
Hiro
Member
Members
Forum Posts: 13
Member Since:
January 31, 2019
sp_UserOfflineSmall Offline
3
February 18, 2019 - 9:42 pm
sp_Permalink sp_Print

I would like to allow most characters in story titles, such as brackets [ ] ( ) parentheses, dashes etc. Which characters should definitely not be allowed to prevent XSS attacks?

Avatar
redwine
Admin
Forum Posts: 341
Member Since:
February 21, 2018
sp_UserOfflineSmall Offline
4
February 19, 2019 - 1:21 pm
sp_Permalink sp_Print

Hiro said
I would like to allow most characters in story titles, such as brackets [ ] ( ) parentheses, dashes etc. Which characters should definitely not be allowed to prevent XSS attacks?  

Google XSS prevention. There are a lot of sites discussing this issue. Anyway, the code above was a quick fix because there was a vulnerability. In the new version I am taking other measures to prevent XSS.

Forum Timezone: Asia/Beirut

Most Users Ever Online: 28

Currently Online:
3 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

john: 47

Nishant kumar: 33

Mosage: 25

Punk: 23

Martin Gold: 22

Felipe: 21

StaticMove: 13

Hiro: 13

yami: 13

Cesar: 12

Newest Members:

Kajal Raj

Nik

Mannes

sandeep

Vityola

alex

larkpeyton

Mohi Uddin

Sandeep Verma

sansui

Forum Stats:

Groups: 1

Forums: 8

Topics: 118

Posts: 690

 

Member Stats:

Guest Posters: 0

Members: 144

Moderators: 0

Admins: 1

Administrators: redwine