ElkArte Community

Title: [1.0.3] edit post changes quote BBC
Post by: Jorin on March 26, 2015, 09:06:22 am
Use [quote=http://forum-alternative-antriebe.de]text[/quote]. Looks fine for the moment.

But then edit the post, change anything, and save it. The BBC changed to this: [quote author=http://forum-alternative-antriebe.de]text[/quote] and the link to the source page doesn't work anymore.  :(
Title: Re: [1.0.3] edit post changes quote BBC
Post by: emanuele on March 26, 2015, 09:46:15 am
Yeah, one of those situations where too flexibility is tricky to handle.
If you have some time, try this, in themes/default/scripts/jquery.sceditor.elkarte.js:
Code: (find) [Select]
			if ($elm.attr('link'))
link = ' link=' + $elm.attr('link');
Code: (add after) [Select]

if (author === '' && date === '' && link !== '')
link = '=' + $elm.attr('link');

and:
Code: (find) [Select]
				attr_author = attrs.defaultattr;
sAuthor = bbc_quote_from + ': ' + attr_author;
Code: (replace with) [Select]
				attr_link = attrs.defaultattr;
sLink = attr_link.substr(0, 7) === 'http://' ? attr_link : elk_scripturl + '?' + attr_link;
sAuthor = '<a href="' + sLink + '">' + bbc_quote_from + ': ' + sLink + '</a>';
Title: Re: [1.0.3] edit post changes quote BBC
Post by: emanuele on April 01, 2015, 03:27:20 pm
https://github.com/emanuele45/Dialogo/commit/397ad61da91f64c43520552dac62c7145f3d8634