ID:1865085
 
(See the best response by Nadrew.)
Code:
mob/verb/Test()
var/c = "\"Lol!\""
winset(src,"input1","text=\"[c]\"")


Problem description:

Doesn't work. Please help with haste.
You need to use \\\" [text] \\\"
So,

var/c = "Lol!"
winset(src,"input1","text=\"\\\"[c]\\\"\"")
Best response
Or you know.

var/c = "\"Lol!\""
winset(src,"input1","text='[c]'")
In response to Nadrew
Go with Nadrews. It's more appealing. I forgot that method was achievable.
In response to Nadrew
I think your solution has problems if apostrophes are used in the embedded string.
NEW PROBLEM.
When I take text from a multi-line input and browse it, it doesn't recognize the correct line. Help?
Technically the skin interpreter thinks single quotes are for file names, so it's best to avoid them for escaping text. My advice is to use url_encode() on the text, or you can just use list2params() to encode everything.
In response to Nadrew
This will break if you use apostraphes in var/c
halp
In response to Elemente
Elemente wrote:
This will break if you use apostraphes in var/c
halp

Try using,
var/c = "Lol!"
winset(src,"input1","text=\"\\\"[c]\\\"\"")
In response to Elemente
Elemente wrote:
This will break if you use apostraphes in var/c
halp

Why not do...
var c = "lol"
winset(src,"input1",list2params(list("text"="[c]")))
In response to Pokemonred200
// Lummox JR's suggestions:
var c = "blarg"

winset(src, "input1", list2params(list(text = c)))

// or
winset(src, "input1", "text=[url_encode(c)]")