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

Fix Problem with search engine and ckeditor config #31232

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

vmaury
Copy link
Contributor

@vmaury vmaury commented Oct 2, 2024

FIX #31231

A so-so fix that's change ckeditor conf so that it doesn't convert accentuated chars in html_entities but let them as is (in utf8)

May be it would be better change this in /htdocs/includes/ckeditor/ckeditor/build-config.js and re-build ckeditor but I dn't know how to ..

@@ -32,6 +32,7 @@ CKEDITOR.editorConfig = function( config )
//config.autoParagraph = false;
//config.removeFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd'; // See also rules on this.dataProcessor.writer.setRules
//config.forcePasteAsPlainText = true;
config.entities_latin = false;
Copy link
Member

@eldy eldy Oct 3, 2024

Choose a reason for hiding this comment

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

A better choice would be to add it into doleditor.class.php after line
/* property:xxx is same than CKEDITOR.config.property = xxx */
so we can set the value to true of flase depending if $conf->db->dolibarr_main_db_collationcontains the key 'latin'or not.
Can you try this ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure it depends on the database collation
the screen charset is I think always utf-8
<meta charset="utf-8">
I tested on 2 instances
the first dolibarr 16
$dolibarr_main_db_character_set='latin1';
$dolibarr_main_db_collation='latin1_swedish_ci';

the second dolibarr 21 alpha
$dolibarr_main_db_character_set='utf8';
$dolibarr_main_db_collation='utf8_unicode_ci';

In both cases,
config.entities_latin = false
Is ok.

I think in ckeditor, config.entities_latin is not the right word, It should be config.html_entities

@eldy eldy added the PR to fix or conflict to solve PR needs to be fixed to be integrated (except for conflicts, a comment describes the fix to do) label Oct 3, 2024
@eldy eldy merged commit 8e62fe4 into Dolibarr:develop Oct 4, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR to fix or conflict to solve PR needs to be fixed to be integrated (except for conflicts, a comment describes the fix to do)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem with search engine and ckeditor config
2 participants