Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • 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
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

How not to convert "c:out" into smilies ?

 
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lines like "<c ut" will be inadvertently turned into smilies. The only way I know to keep the line intact is to disable smilies.>

Is there a way for me to keep both ?
 
Sheriff
Posts: 67592
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While I'd love to see smilies disabled by default (see other topic in this forum), you can prevent them, without disabling smilies, in code blocks by using the HTML entity for the colon character.

So instead of entering

<c:out>

you would enter

<c&#58;out>

Note that I entered this reply without disabling smilies.
 
Bear Bibeault
Sheriff
Posts: 67592
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use the same technique for entering otherwise forbidden phrases such as:

onclick

and the like.
 
Ken Loh
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the great tips! It would definitely able to get rid of many people's woes as far as smileys are concerned. Java ranch administrators, care to put Bileault's tips at somewhere really prominent ?

Originally posted by Bear Bibeault:
While I'd love to see smilies disabled by default (see other topic in this forum), you can prevent them, without disabling smilies, in code blocks by using the HTML entity for the colon character.

So instead of entering

<c:out>

you would enter

<c&#58;out>

Note that I entered this reply without disabling smilies.

 
Ken Loh
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ken Loh:
Thanks for the great tips! It would definitely able to get rid of many people's woes as far as smileys are concerned. Java ranch administrators, care to put Bibeault's tips at somewhere really prominent for the sake of all your users ?

 
I have always wanted to have a neighbor just like you - Fred Rogers. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic