-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Incorrect behavior when parsing html tag 'br' #1325
Comments
Did you try the dev-develop version? |
yes |
If you parse the following it's fine <p>test1<br/>test2</p> |
@troosan Is it expected that you use the paragraph tag around any HTML added this way? I am getting the same issue as OP. I do not use the paragraph tag because it creates formatting I do not want. This seems to have been introduced in 0.14 because if I go back to 0.13 it does not happen. |
I'll see if I can restore backward compatibility. |
This is:
Expected Behavior
When I use the tag
<br/>
in html string and parse it in phpword like addHtml('test1<br/>
test2'), in MsWord I expect to recieve next:'test1' (soft line break like 'shift+enter')
'test2'
Current Behavior
But now it work as next:
'test1' (line break like 'enter')
'empty string' (line break like 'enter')
'test2'
Failure Information
An empty string is inserted because function 'parseLineBreak' in class 'html' do it ($element->addTextBreak();). If this function is made empty, then the extra line will disappear. However, where to replace line break to soft line break, I did not find
How to Reproduce
Please provide a code sample that reproduces the issue.
Context
The text was updated successfully, but these errors were encountered: