\"> error
Well, you may have noticed this post on the mybb comunity forums, but no-on' replied, so i ask it here a second time:p the code for the contents of the message= <input type="hidden" name="qq$post[pid]" value="$post[message]" /> but if the message contains ">, the code uses this as end. and so everything behinds the "> + " /> is pasted between the quick delete and quick quote button. . the javascript-functions used are:
function quickquotesel() {
	if (document.getSelection && document.getSelection().length > 0) { qqsel = document.getSelection(); }
	else if (document.selection && document.selection.type == "Text" && document.selection.createRange) { qqsel = document.selection.createRange().text; }

function quickquote(pid) {
	if(qqsel != "" && qqsel.indexOf("[quote[b][color=red]#[/color][/b]]") == -1) { var quote = qqsel; }
	else { var quote = eval("document.quickquote.qq"+pid+".value"); }
	qqsel = "";
	var username = eval("document.quickquote.qqu"+pid+".value");
	document.input.message.value += "[quote[b][color=red]#[/color][/b]="+username+"]"+quote+"[/quote]\\n";
	if (window.Event) document.captureEvents(Event.MOUSEUP);
	document.onmouseup = quickquotesel;
If you don't understand what i mean, you can look at this: http://smethead.kaonet.net/forum/showthr...d=34#pid34

# is not part of the code but else this board sees this as a quote

Does someone know how i can fix this?
In all honesty, I'm afraid I'm not too sure.

I had a go at writing a very basic quick quote many months ago and I think I *might* have found a solution then, but I don't still have the code stored anywhere. :s

Is there any way you could change any occurences of " in the messages to &quot; instead? Just a thought. Undecided
well, i tried that. i can't use PHP in the templates (unless someone can telll me how to) so I jsut adde an extra line in function_post.php to remove the htmlspecialchars. Now the only problem left is that the message also doesn't have the chars. If someone could tell me how to use PHP in templates, it would be ver very very usefull Big Grin
As i can't edit my previous post, i'll write it here:
i've added this code in functions_post.php:
$post[qqumessage] = htmlspecialchars($post[message]);
and i changed $post[message] in $post[qqumessage] in the template.
It's always something simple. Toungue

I'm glad your problem is sorted anyway. Smile

Forum Jump:

Users browsing this thread: 1 Guest(s)