Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.
Buying anything on Amazon? Please use the Geekzone Amazon aff link.




1768 posts

Uber Geek
+1 received by user: 45

Trusted

Topic # 76046 28-Jan-2011 00:49 Send private message

Hi I am trying to post some code examples on my blog and am struggling with the fact that the geekzone site strips bits out to avoid cross site scripting hacks.

So what is the best way to post coding examples on geekzone?

The only luck I have had is to replace < with &lt;

I would really like a solution that could also use syntax highlighting if possible.

I have been trying out some different things. One is http://tohtml.com/php/ which is pretty good as it does syntax highlighting, unfortunately geekzone stips the colour codes but all the syntax is correct.
I can't use Live Writer as it passes the non html version of the code. Also editing of the post isn't possible as the special html codes are converted into standard html codes and so get stripped on editing.

Still it works.

What I would like to see is the html code use something like php htmlentities so all the special character would be converted into the likes of &lt;
Just a thought.

Create new topic


1768 posts

Uber Geek
+1 received by user: 45

Trusted

  Reply # 435519 4-Feb-2011 21:34 Send private message

Something like this would be good to have, can the Geekzone blogs work with this?
http://blog.eviac.com/2010/11/publish-source-code-in-blogger-using.html

BDFL
50454 posts

Uber Geek
+1 received by user: 4855

Administrator
Trusted
Geekzone
Subscriber

  Reply # 435521 4-Feb-2011 21:41 Send private message

We can try adding that to the Blog configuration and making it automatic.







1768 posts

Uber Geek
+1 received by user: 45

Trusted

  Reply # 435540 4-Feb-2011 22:51 Send private message

Thanks would be awesome thanks.

Create new topic




Twitter »
Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





Trending now »

Hot discussions in our forums right now:

forgot how to unlock a car door
Created by joker97, last reply by benokobi on 18-Dec-2014 22:08 (38 replies)
Pages... 2 3


Has Spark (Telecom) locked their iphone 6 ?
Created by anewguy2014, last reply by michaelmurfy on 17-Dec-2014 14:32 (25 replies)
Pages... 2


In defence of cats
Created by Rikkitic, last reply by DarthKermit on 17-Dec-2014 15:40 (68 replies)
Pages... 3 4 5


How is iParcel these days?
Created by peejayw, last reply by surfisup1000 on 18-Dec-2014 21:45 (19 replies)
Pages... 2


Couriers starting to charge for redelivery
Created by mattwnz, last reply by raytaylor on 18-Dec-2014 02:27 (77 replies)
Pages... 4 5 6


Slaughter of Innocents
Created by networkn, last reply by heylinb4nz on 19-Dec-2014 09:55 (55 replies)
Pages... 2 3 4


Google Chromecast now available in New Zealand
Created by freitasm, last reply by markl on 18-Dec-2014 15:36 (153 replies)
Pages... 9 10 11


How to upload 150GB of photos to iCloud?
Created by josephhinvest, last reply by timbosan on 17-Dec-2014 15:05 (35 replies)
Pages... 2 3



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.

Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.