Forums

RS-Linkify Thread is sticky

Quick find code: 261-262-33-65181208

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
^you two (Keighlea & Toast) need to stop sniffing each other!

And yeah that was just a lil update for Toast :)

Next one I'm working on is for Imola. Thread author's posts will be highlight throughout their thread. Not sure if I'll do it with background colour or border colour yet, still got a bit do before I'm up to that stage.

26-May-2014 07:01:31

Toastcrumbs

Toastcrumbs

Posts: 5,801 Rune Posts by user Forum Profile RuneMetrics Profile
Indecent Act said :
^you two (Keighlea & Toast) need to stop sniffing each other!


I did stop :( She carried it on!

Indecent Act said :
Not sure if I'll do it with background colour or border colour yet, still got a bit do before I'm up to that stage.


Maybe do it with the border you use in this thread? :)

26-May-2014 07:16:42

Blasty
Feb Member 2017

Blasty

Posts: 9,319 Rune Posts by user Forum Profile RuneMetrics Profile
Indecent Act said :
Blasty's Polls are awesome reads as Blasty's Polls are awesome

Just a minor thing I thought I'd mention, no biggie.


Finally got to looking into it, and now I've fixed it but I don't like the solution >.< At the moment it requests a script to run in order to load a poll, and luckily google automatically cleans up text so a script can't get inserted. This makes it safe to let it change the html contents rather than text contents, but I don't want to keep it that way. After my exams I'll change how it works so it sends a JSON object instead.

i

­­
­­<
Blasty
the Blue
>­­
­­
Blasty
// @BlastytheBlue // Blasty#5167
| Co-owner of Mine Nation

27-May-2014 05:56:29 - Last edited on 27-May-2014 05:58:26 by Blasty

Maz
Nov Member 2016

Maz

Posts: 6,590 Rune Posts by user Forum Profile RuneMetrics Profile
@Blasty,

Good luck with your exams. I, myself, have just recently managed to get all the needed student credits in, so I can graduate in about two weeks time. :)


~Maz~
“Just because you aren't paranoid doesn't mean they aren't after you.”
Maz

27-May-2014 07:28:24 - Last edited on 27-May-2014 07:29:49 by Maz

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
@Blasty, Cool glad you're getting it sorted :)

I use the DOM for stuff like this, kind of a dirty trick but it's nice because it covers all. This is untested but scripts shouldn't execute if appended to an element. So it's matter of making sure calling the function doesn't execute anything unwanted.

function cleanEntitiy(t){
var div = document.createElement("div&quot ;) ;
div.innerHTML = t;
return div.innerText;
}

alert( cleanEntitiy("
&l t;
&quot ;) ); // should alert '
<
'


edit:
Since you're the master of executing unwanted scripts, here's a link to play with :)
http://www.indecentcode.com/test.html

Keep in mind, there is no error correction and nothing added to circumvent unwanted input. I'd definitely add some extra safety measures but this is just a demo to show what the DOM can clean up.

27-May-2014 07:57:29 - Last edited on 27-May-2014 09:28:11 by Indecent Act

Quick find code: 261-262-33-65181208 Back to Top