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

confusing values coming from getVariables() #573

Open
rootuser opened this issue Jul 13, 2015 · 0 comments
Open

confusing values coming from getVariables() #573

rootuser opened this issue Jul 13, 2015 · 0 comments

Comments

@rootuser
Copy link

rootuser commented Jul 13, 2015

Hello,

this issue is somewhat related to this issue: #548

Basically, I have written a function that scans through a directory, identifies all docx files and then scans each for placeholders ( like ${NAME} ) in the text.
If placeholders are found, these are stored in a database table.

This works well so far, but now I noticed that the placeholders are not always delivered correctly by the getVariables() function of PhpWord\TemplateProcessor. For some docx files I get the correct placeholder names, for others I get the names surounded by a bunch of strange xml tags, like
</w:t></w:r><w:r w:rsidR="004F6DA4"><w:t>ADRESSE</w:t></w:r><w:r><w:t>

That is probably the reason why I cannot use the setValue() function on these documents.
When I use the php strip_tags() function on the 'broken' tag first, the setValue() succeeds though.

Do you know of this issue?

Thank you very much,
Tom


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

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

No branches or pull requests

1 participant