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

Working on sanitize title #69

Open
wants to merge 5 commits into
base: master
from

Conversation

Projects
None yet
1 participant
@Mte90
Copy link

Mte90 commented Jan 28, 2019

No description provided.

Mte90 added some commits Jan 28, 2019

ops
@Mte90

This comment has been minimized.

Copy link
Author

Mte90 commented Jan 28, 2019

As I can see the text is sanitized but not the text that is parsing, this fix the 90% of the cases but I have another title that is not working.
My exmapleis an heading with a word and a ' that not works the alternative text.

@Mte90

This comment has been minimized.

Copy link
Author

Mte90 commented Jan 29, 2019

Confirmed that this patch works with all my cases.

@Mte90

This comment has been minimized.

Copy link
Author

Mte90 commented Feb 5, 2019

this patch avoid that the plugin is executed if the part hook is the wp_head.
In that way to generate the content for plugin that write opengraph is not executed to simplify debugging and improve the performance.

@Mte90

This comment has been minimized.

Copy link
Author

Mte90 commented Feb 5, 2019

I am facing the problem of the ' encoded as ’ in the alt_heading so the match from the textarea is not possible.
I was thinking if add a filter or do a manually and wondering if it is happen also with other symbols

@Mte90

This comment has been minimized.

Copy link
Author

Mte90 commented Feb 5, 2019

$matches[ $i ][0] = str_replace('’',"'",$matches[ $i ][0]); with this one I handle that problem

Mte90 added some commits Feb 6, 2019

// escape some regular expression characters
// others: http://www.php.net/manual/en/regexp.reference.meta.php
$original_heading = str_replace(
array( '\*' ),
array( '.*' ),
array( '\*', '

' ),

This comment has been minimized.

@Mte90

Mte90 Feb 6, 2019

Author

there is this strange character that I cannot identify 

 (seems empty but in the middle there is a character) that create issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment