Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ticket/13847] Move quote generation to text_formatter.utils #3616

Merged
merged 4 commits into from May 29, 2015

Conversation

JoshyPHP
Copy link
Contributor

https://tracker.phpbb.com/browse/PHPBB3-13847

The markup used for quotes, [quote=".."]...[/quote] is currently hardcoded in posting.php. This could be moved to a method in the text_formatter.utils service.

Ultimately, anything that manipulates markup should live in a text_formatter.* service.

@Nicofuma Nicofuma modified the milestone: 3.2.0 May 17, 2015
$message_parser->message = '[quote="' . $post_data['quote_username'] . '"]' . censor_text(trim($message_parser->message)) . "[/quote]\n";
$message_parser->message = $phpbb_container->get('text_formatter.utils')->generate_quote(
censor_text(trim($message_parser->message)),
array('author' => $post_data['quote_username'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couldn't we generate the quote with a link to the user profile?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. You can put as much metadata as you want, and then use it in the template. I'm wary of overloading the UI though. There's a topic about possible quote improvements on A51.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets discuss that on a51 so

@JoshyPHP JoshyPHP force-pushed the ticket/13847 branch 2 times, most recently from 00e1bab to 43ee388 Compare May 22, 2015 14:20
@JoshyPHP
Copy link
Contributor Author

@Nicofuma Can you merge this PR whenever you have time please? Other PRs will depend on it and since most of my PRs modify more or less the same files I'm getting conflicts when merging/rebasing.

Will enclose attribute values in single- or double- quotes depending on
whichever requires the least escaping. Characters that need to be escaped
are always escaped regardless.

PHPBB3-13847
@Nicofuma Nicofuma merged commit 64e1824 into phpbb:master May 29, 2015
Nicofuma pushed a commit that referenced this pull request May 29, 2015
[ticket/13847] Move quote generation to text_formatter.utils
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants