Strip HTML

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Scam Warning
Locked
ashwinimp
Registered User
Posts: 2
Joined: Fri Jun 22, 2012 1:12 pm

Strip HTML

Post by ashwinimp »

How to strip html tags in the editor when user posts '<b>'Example'</b>'.
darksminky
Registered User
Posts: 132
Joined: Wed Jan 26, 2011 9:13 pm

Re: Strip HTML

Post by darksminky »

do you mean strip or escape?
it escapes automatically
EDIT:
I'll do it.
AsreyionGames
Registered User
Posts: 4
Joined: Thu Jun 21, 2012 9:58 pm

Re: Strip HTML

Post by AsreyionGames »

HTML tags are stipped out by default, what would be cool is like if <b>SomeText</b> or <i>Some Text 2</i> got turned into [ b ]SomeText[ /b ] and [ i ]Some Text 2[ /i ]
darksminky
Registered User
Posts: 132
Joined: Wed Jan 26, 2011 9:13 pm

Re: Strip HTML

Post by darksminky »

so a conversion of < and > to [ and ]
I'll give it a shot.
User avatar
AmigoJack
Registered User
Posts: 6108
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Strip HTML

Post by AmigoJack »

darksminky wrote:a conversion of < and > to [ and ]
Beware of this plain approach when someone is about to post this:

Code: Select all

In [i]ACP > Profile > Edit signature[/i] use a fish emoticon [b]<º)))><[/b]
...or:

Code: Select all

In [b]/includes/functions.php[/b] add: 
[code]if( 1< 2 ) $this-> array( 0=> '' );
[/code]
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
darksminky
Registered User
Posts: 132
Joined: Wed Jan 26, 2011 9:13 pm

Re: Strip HTML

Post by darksminky »

indeed, that has been one of two obstacles
the other being support across MODs, not just default forums, though I'm seriously considering dropping that idea and releasing plugins for other MODs.
the styles editor in the ACP is another consideration, but I've got that one figured out.
ashwinimp
Registered User
Posts: 2
Joined: Fri Jun 22, 2012 1:12 pm

Re: Strip HTML

Post by ashwinimp »

Thanks for the replies. I put forward my question again this way:
When I enter a text 'SomeText' and make it bold, it appears as '<b>'SomeText' </b>' in the editor.
I want 'SomeText' to be bold in front-end but don't want to append'<b>''</b>' with SomeText in the editor when I am replying to the post.
Please note: '[ ] ' is replaced with '< >' for bold tag above.
Can anyone let me know how this can be done or is it possible to do?
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: Strip HTML

Post by Erik Frèrejean »

I think that you are looking for a WYSIWYG editor. As you see there are a couple of those under development, though keep in mind that it isn't advised to use unstable MODs on a live forum.
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)
Locked

Return to “[3.0.x] MOD Requests”